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:
authorSureshkumar T <suresh@mono-cvs.ximian.com>2005-09-13 17:50:22 +0400
committerSureshkumar T <suresh@mono-cvs.ximian.com>2005-09-13 17:50:22 +0400
commit3435f767fe46d2af681d69f128f62bfe453180bc (patch)
tree083f3a01e203c164785a02426e1966590b988683 /mcs/class/System.Data/Test/ProviderTests/sql
parent59b12a56036bcd1357ad44f3e5bb17060fa3f089 (diff)
2005-09-13 Sureshkumar T <tsureshkumar@novell.com>
* sql/sybase.sql: added. script file to create test database on sybase. * Makefile: Added reference to Sybase db. svn path=/trunk/mcs/; revision=49966
Diffstat (limited to 'mcs/class/System.Data/Test/ProviderTests/sql')
-rw-r--r--mcs/class/System.Data/Test/ProviderTests/sql/ChangeLog5
-rw-r--r--mcs/class/System.Data/Test/ProviderTests/sql/mysql.sql10
-rw-r--r--mcs/class/System.Data/Test/ProviderTests/sql/sqlserver.sql14
-rw-r--r--mcs/class/System.Data/Test/ProviderTests/sql/sybase.sql120
4 files changed, 136 insertions, 13 deletions
diff --git a/mcs/class/System.Data/Test/ProviderTests/sql/ChangeLog b/mcs/class/System.Data/Test/ProviderTests/sql/ChangeLog
index f560dfcf536..1c4a62b06cd 100644
--- a/mcs/class/System.Data/Test/ProviderTests/sql/ChangeLog
+++ b/mcs/class/System.Data/Test/ProviderTests/sql/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-13 Sureshkumar T <tsureshkumar@novell.com>
+
+ * sybase.sql: added. script file to create test database on
+ sybase.
+
2005-09-01 Sureshkumar T <tsureshkumar@novell.com>
* SCHEMA: schema specification.
diff --git a/mcs/class/System.Data/Test/ProviderTests/sql/mysql.sql b/mcs/class/System.Data/Test/ProviderTests/sql/mysql.sql
index 4b1723f30bd..f31407bcfc8 100644
--- a/mcs/class/System.Data/Test/ProviderTests/sql/mysql.sql
+++ b/mcs/class/System.Data/Test/ProviderTests/sql/mysql.sql
@@ -3,7 +3,7 @@ use monotest
//
-- =================================== OBJECT NUMERIC_FAMILY =========================
--- TABLE : INT_FAMILY
+-- TABLE : NUMERIC_FAMILY
-- data with id > 6000 is not gaurenteed to be read-only.
drop table if exists numeric_family;
//
@@ -24,14 +24,12 @@ create table numeric_family (
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);
-//
+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); //
-- =================================== END OBJECT NUMERIC_FAMILY ========================
-- =================================== OBJECT BINARY_FAMILY =========================
--- TABLE : INT_FAMILY
+-- TABLE : BINARY_FAMILY
-- data with id > 6000 is not gaurenteed to be read-only.
drop table if exists binary_family;
//
@@ -102,4 +100,4 @@ begin
end
//
--- =================================== END OBJECT EMPLOYEE ============================ \ No newline at end of file
+-- =================================== END OBJECT EMPLOYEE ============================
diff --git a/mcs/class/System.Data/Test/ProviderTests/sql/sqlserver.sql b/mcs/class/System.Data/Test/ProviderTests/sql/sqlserver.sql
index b56e1cf7ce2..3761ae87a55 100644
--- a/mcs/class/System.Data/Test/ProviderTests/sql/sqlserver.sql
+++ b/mcs/class/System.Data/Test/ProviderTests/sql/sqlserver.sql
@@ -1,8 +1,8 @@
use monotest
go
--- =================================== OBJECT EMPLOYEE ============================
--- TABLE : INT_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
name = 'numeric_family' and type = 'U')
@@ -28,13 +28,13 @@ 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);
go
--- =================================== END OBJECT EMPLOYEE ========================
+-- =================================== END OBJECT NUMERIC_FAMILY ========================
-- =================================== OBJECT BINARY_FAMILY =========================
--- TABLE : INT_FAMILY
+-- TABLE : BINARY_FAMILY
-- data with id > 6000 is not gaurenteed to be read-only.
if exists (select name from sysobjects where
- name = 'employee' and type = 'U')
+ name = 'binary_family' and type = 'U')
drop table binary_family;
go
@@ -48,7 +48,7 @@ create table binary_family (
type_longblob_image image NULL);
go
-insert into binary_family values (1, convert (image, '555555'), convert (image, '0123456789012345678901234567890123456789012345678901234567890123456789'),
+insert into binary_family values (1, convert (binary, '555555'), convert (varbinary, '0123456789012345678901234567890123456789012345678901234567890123456789'),
convert (image, '66666666'), convert (image, '777777'),
convert (image, '888888'), convert (image, '999999'));
--insert into binary_family values (2,
@@ -116,4 +116,4 @@ go
--- =================================== END OBJECT EMPLOYEE ============================ \ No newline at end of file
+-- =================================== END OBJECT EMPLOYEE ============================
diff --git a/mcs/class/System.Data/Test/ProviderTests/sql/sybase.sql b/mcs/class/System.Data/Test/ProviderTests/sql/sybase.sql
new file mode 100644
index 00000000000..2d31ee3ad57
--- /dev/null
+++ b/mcs/class/System.Data/Test/ProviderTests/sql/sybase.sql
@@ -0,0 +1,120 @@
+use monotest
+go
+
+-- =================================== OBJECT EMPLOYEE ============================
+-- TABLE : INT_FAMILY
+-- data with id > 6000 is not gaurenteed to be read-only.
+if exists (select name from sysobjects where
+ name = 'numeric_family' and type = 'U')
+ drop table numeric_family
+go
+
+create table numeric_family (
+ id int PRIMARY KEY NOT NULL,
+ type_bit bit NOT NULL,
+ type_tinyint tinyint NULL,
+ type_smallint smallint NULL,
+ type_int int NULL,
+ type_bigint numeric (38,0) NULL,
+ type_decimal decimal (38, 0) NULL,
+ type_numeric numeric (38, 0) NULL,
+ type_money money NULL,
+ type_smallmoney smallmoney 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,0,null,null,null,null,null,null,null,null)
+go
+
+-- =================================== END OBJECT EMPLOYEE ========================
+
+-- =================================== OBJECT BINARY_FAMILY =========================
+-- TABLE : BINARY FAMILY
+-- data with id > 6000 is not gaurenteed to be read-only.
+if exists (select name from sysobjects where
+ name = 'binary_family' and type = 'U')
+ drop table binary_family
+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)
+go
+
+insert into binary_family values (1, convert (binary, '555555'), convert (varbinary, '0123456789012345678901234567890123456789012345678901234567890123456789'),
+ convert (image, '66666666'), convert (image, '777777'),
+ convert (image, '888888'), convert (image, '999999'))
+--insert into binary_family values (2,
+--insert into binary_family values (3,
+insert into binary_family values (4,null,null,null,null,null,null)
+go
+
+-- =================================== END OBJECT BINARY_FAMILY ========================
+
+
+-- =================================== OBJECT EMPLOYEE ============================
+-- TABLE : EMPLOYEE
+-- data with id above 6000 is not gaurenteed to be read-only.
+if exists (select name from sysobjects where
+ name = 'employee' and type = 'U')
+ drop table employee
+go
+
+create table employee (
+ id int PRIMARY KEY NOT NULL,
+ fname varchar (50) NOT NULL,
+ lname varchar (50) NULL,
+ dob datetime NOT NULL,
+ doj datetime NOT NULL,
+ email varchar (50) NULL)
+go
+
+grant all privileges on employee to monotester
+
+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
+-- SP : sp_clean_employee_table
+if exists (select name from sysobjects where
+ name = 'sp_clean_employee_table' and type = 'P')
+ drop procedure sp_clean_employee_table
+go
+
+create procedure sp_clean_employee_table
+as
+begin
+ delete from employee where id > 6000
+end
+go
+
+
+-- SP : sp_get_age
+if exists (select name from sysobjects where
+ name = 'sp_get_age' and type = 'P')
+ drop procedure sp_get_age
+go
+
+create procedure sp_get_age (
+ @fname varchar (50),
+ @age int output)
+as
+begin
+ select @age = datediff (day, dob, getdate ()) from employee where fname like @fname
+ return @age
+end
+go
+
+
+
+-- =================================== END OBJECT EMPLOYEE ============================