Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSenganal T <senga@mono-cvs.ximian.com>2005-09-16 19:51:44 +0400
committerSenganal T <senga@mono-cvs.ximian.com>2005-09-16 19:51:44 +0400
commite520ee3e0af201b2324025c2e860ebaa0a6b9562 (patch)
tree98fe537a72b267caa1948cc65574319577e4cf86 /mcs/class/System.Data/Test/ProviderTests/sql
parent378020ef2388bacd3837f51a554abe2a5223d9a6 (diff)
2005-09-16 Senganal T <tsenganal@novell.com>
* System.Data.Connected.Tests.dll.sources: added more source files * sql/sqlserver.sql: modified. added string_family, datetime_family, modified numeric_family values. created new database mono-test for checking -. * Common/DataProvider.cs : Provides data for validation DataProvider provides the data that is used for validating Sq[DataReader. Currently it uses a dataset to fill data from the database. Will be modified later to get the values from a config file. * System.Data.SqlClient/SqlCommandTest.cs: added more testcases for connected mode * System.Data.SqlClient/SqlConnectionTest.cs: added more testcases for connected mode * System.Data.SqlClient/SqlDataAdapterTest.cs: added more testcases for connected mode * System.Data.SqlClient/SqlDataReaderTest.cs: added more testcases for connected mode svn path=/trunk/mcs/; revision=50153
Diffstat (limited to 'mcs/class/System.Data/Test/ProviderTests/sql')
-rw-r--r--mcs/class/System.Data/Test/ProviderTests/sql/ChangeLog6
-rw-r--r--mcs/class/System.Data/Test/ProviderTests/sql/sqlserver.sql114
2 files changed, 93 insertions, 27 deletions
diff --git a/mcs/class/System.Data/Test/ProviderTests/sql/ChangeLog b/mcs/class/System.Data/Test/ProviderTests/sql/ChangeLog
index 1c4a62b06cd..b16ad3e8f4d 100644
--- a/mcs/class/System.Data/Test/ProviderTests/sql/ChangeLog
+++ b/mcs/class/System.Data/Test/ProviderTests/sql/ChangeLog
@@ -1,3 +1,9 @@
+2005-09-16 Senganal T <tsenganal@novell.com>
+
+ * sqlserver.sql: modified. added string_family, datetime_family,
+ modified numeric_family values.
+ created new database mono-test for checking -.
+
2005-09-13 Sureshkumar T <tsureshkumar@novell.com>
* sybase.sql: added. script file to create test database on
diff --git a/mcs/class/System.Data/Test/ProviderTests/sql/sqlserver.sql b/mcs/class/System.Data/Test/ProviderTests/sql/sqlserver.sql
index 3761ae87a55..117b41ae1d3 100644
--- a/mcs/class/System.Data/Test/ProviderTests/sql/sqlserver.sql
+++ b/mcs/class/System.Data/Test/ProviderTests/sql/sqlserver.sql
@@ -1,7 +1,12 @@
-use monotest
-go
+if exists (select name from sysdatabases where
+ name = 'mono-test')
+ drop database [mono-test];
+create database [mono-test];
+grant all privileges on [mono-test] to monotester;
+
+use monotest;
--- =================================== OBJECT NUMERIC_FAMILY ============================
+-- =================================== OBJECT NUMERIC_FAMILY============================
-- TABLE : NUMERIC_FAMILY
-- data with id > 6000 is not gaurenteed to be read-only.
if exists (select name from sysobjects where
@@ -9,25 +14,28 @@ if exists (select name from sysobjects where
drop table numeric_family;
go
-create table numeric_family (
- id int PRIMARY KEY NOT NULL,
- type_bit bit NULL,
- type_tinyint tinyint NULL,
- type_smallint smallint NULL,
- type_int int NULL,
- type_bigint bigint NULL,
- type_decimal decimal (38, 0) NULL,
- type_numeric numeric (38, 0) NULL,
- type_money money NULL,
- type_smallmoney smallmoney NULL);
+create table numeric_family(id tinyint PRIMARY KEY NOT NULL,
+ type_bit bit NULL,
+ type_tinyint tinyint NULL,
+ type_smallint smallint NULL,
+ type_int int NULL,
+ type_bigint bigint NULL,
+ type_decimal decimal(38,0) NULL,
+ type_numeric numeric(38,0) NULL,
+ type_money money NULL,
+ type_smallmoney smallmoney NULL,
+ type_float real NULL,
+ type_double float NULL);
go
-insert into numeric_family values (1,1,255,32767,2147483647,9223372036854775807,1000,1000,922337203685477.5807,214748.3647);
-insert into numeric_family values (2,0,0,-32768,-2147483648,-9223372036854775808,-1000,-1000,-922337203685477.5808,-214748.3648);
-insert into numeric_family values (3,0,0,0,0,0,0,0,0,0);
-insert into numeric_family values (4,null,null,null,null,null,null,null,null,null);
+grant all privileges on numeric_family to monotester;
go
+insert into numeric_family values (1,1,255,32767,2147483647,9223372036854775807,1000,1000,922337203685477.5807,214748.3647,3.40E+38,1.79E+308);
+insert into numeric_family values (2,0,0,-32768,-2147483648,-9223372036854775808,-1000,-1000,-922337203685477.5808,-214748.3648,-3.40E+38,-1.79E+308);
+insert into numeric_family values (3,0,0,0,0,0,0,0,0,0,0,0);
+insert into numeric_family values (4,null,null,null,null,null,null,null,null,null,null,null);
+go
-- =================================== END OBJECT NUMERIC_FAMILY ========================
-- =================================== OBJECT BINARY_FAMILY =========================
@@ -39,13 +47,16 @@ if exists (select name from sysobjects where
go
create table binary_family (
- id int PRIMARY KEY NOT NULL,
- type_binary binary NULL,
- type_varbinary varbinary (255) NULL,
- type_blob image NULL,
- type_tinyblob image NULL,
- type_mediumblob image NULL,
- type_longblob_image image NULL);
+ id tinyint PRIMARY KEY NOT NULL,
+ type_binary binary NULL,
+ type_varbinary varbinary (255) NULL,
+ type_blob image NULL,
+ type_tinyblob image NULL,
+ type_mediumblob image NULL,
+ type_longblob_image image NULL);
+go
+
+grant all privileges on binary_family to monotester;
go
insert into binary_family values (1, convert (binary, '555555'), convert (varbinary, '0123456789012345678901234567890123456789012345678901234567890123456789'),
@@ -59,6 +70,53 @@ go
-- =================================== END OBJECT BINARY_FAMILY ========================
+-- =================================== OBJECT STRING_FAMILY============================
+-- TABLE : string_family
+-- data with id above 6000 is not gaurenteed to be read-only.
+if exists (select name from sysobjects where
+ name = 'string_family' and type = 'U')
+ drop table string_family;
+go
+
+create table string_family(id tinyint PRIMARY KEY NOT NULL,
+ type_guid uniqueidentifier NULL,
+ type_char char(10) NULL,
+ type_varchar varchar(10) NULL,
+ type_text text NULL,
+ type_ntext ntext NULL);
+go
+
+grant all privileges on string_family to monotester;
+go
+
+insert into string_family values (1,newid(),"char","varchar","text","ntext");
+insert into string_family values (4,null,null,null,null,null);
+go
+-- =================================== END OBJECT STRING_FAMILY ========================
+
+
+-- =================================== OBJECT DATETIME_FAMILY============================
+-- TABLE : datetime_family
+-- data with id above 6000 is not gaurenteed to be read-only.
+
+if exists (select name from sysobjects where
+ name = 'datetime_family' and type = 'U')
+ drop table datetime_family;
+go
+
+create table datetime_family (
+ id tinyint PRIMARY KEY NOT NULL,
+ type_smalldatetime smalldatetime NULL,
+ type_datetime datetime NULL);
+
+grant all privileges on datetime_family to monotester;
+go
+insert into datetime_family values (1,'2079-06-06 23:59:00','9999-12-31 23:59:59.997');
+insert into datetime_family values (4,null,null);
+go
+
+-- =================================== END OBJECT DATETIME_FAMILY========================
+
-- =================================== OBJECT EMPLOYEE ============================
-- TABLE : EMPLOYEE
-- data with id above 6000 is not gaurenteed to be read-only.
@@ -74,13 +132,17 @@ create table employee (
dob datetime NOT NULL,
doj datetime NOT NULL,
email varchar (50) NULL);
+go
grant all privileges on employee to monotester;
+go
+
insert into employee values (1, 'suresh', 'kumar', '1978-08-22', '2001-03-12', 'suresh@gmail.com');
insert into employee values (2, 'ramesh', 'rajendran', '1977-02-15', '2005-02-11', 'ramesh@yahoo.com');
insert into employee values (3, 'venkat', 'ramakrishnan', '1977-06-12', '2003-12-11', 'ramesh@yahoo.com');
insert into employee values (4, 'ramu', 'dhasarath', '1977-02-15', '2005-02-11', 'ramesh@yahoo.com');
+
go
-- STORED PROCEDURES
@@ -114,6 +176,4 @@ begin
end
go
-
-
-- =================================== END OBJECT EMPLOYEE ============================