Update of /cvsroot/monetdb/sql/src/test/Update_Delete_action/Tests
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1908
Modified Files:
Tag: SQL_2-18
delete_cascade.sql delete_set_default.sql delete_set_null.sql
update_delete_set_null_crash.sql update_delete_set_null.sql
update_set_default.sql update_set_null.sql
Log Message:
The new tests for UPDATE/DELETE CASCADE
Index: delete_set_null.sql
===================================================================
RCS file:
/cvsroot/monetdb/sql/src/test/Update_Delete_action/Tests/delete_set_null.sql,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- delete_set_null.sql 2 Apr 2007 13:08:08 -0000 1.2
+++ delete_set_null.sql 8 Jun 2007 13:06:38 -0000 1.2.2.1
@@ -33,7 +33,13 @@
select * from t2;
select * from t3;
-delete from t1;
+delete from t1 where id = 1;
+
+select * from t1;
+select * from t2;
+select * from t3;
+
+delete from t2 where id = 4;
select * from t1;
select * from t2;
Index: update_set_null.sql
===================================================================
RCS file:
/cvsroot/monetdb/sql/src/test/Update_Delete_action/Tests/update_set_null.sql,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- update_set_null.sql 2 Apr 2007 13:08:13 -0000 1.2
+++ update_set_null.sql 8 Jun 2007 13:06:39 -0000 1.2.2.1
@@ -27,9 +27,12 @@
insert into t3 values(5, 7);
update t1 set id = 10 where id =1;
-update t1 set id = 11 where id =2;
-update t1 set id = 12 where id =3;
-update t1 set id = 13 where id =4;
+
+select * from t1;
+select * from t2;
+select * from t3;
+
+update t2 set id = 6 where id =3;
select * from t1;
select * from t2;
Index: delete_set_default.sql
===================================================================
RCS file:
/cvsroot/monetdb/sql/src/test/Update_Delete_action/Tests/delete_set_default.sql,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -d -r1.3 -r1.3.2.1
--- delete_set_default.sql 18 Apr 2007 16:18:48 -0000 1.3
+++ delete_set_default.sql 8 Jun 2007 13:06:38 -0000 1.3.2.1
@@ -32,7 +32,13 @@
select * from t2;
select * from t3;
-delete from t1;
+delete from t2 where id = 3;
+
+select * from t1;
+select * from t2;
+select * from t3;
+
+delete from t1 where id = 1;
select * from t1;
select * from t2;
Index: update_set_default.sql
===================================================================
RCS file:
/cvsroot/monetdb/sql/src/test/Update_Delete_action/Tests/update_set_default.sql,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- update_set_default.sql 2 Apr 2007 13:08:12 -0000 1.2
+++ update_set_default.sql 8 Jun 2007 13:06:39 -0000 1.2.2.1
@@ -1,6 +1,6 @@
create table t1 (id int, name varchar(1024), PRIMARY KEY(id));
-create table t2 (id int DEFAULT 30, age int, PRIMARY KEY (ID), FOREIGN KEY(id)
REFERENCES t1(id) ON UPDATE SET DEFAULT);
+create table t2 (id int DEFAULT 30, age int, PRIMARY KEY (id), FOREIGN KEY(id)
REFERENCES t1(id) ON UPDATE SET DEFAULT);
create table t3 (id int DEFAULT 30, num int, FOREIGN KEY(id) REFERENCES t2(id)
ON UPDATE SET DEFAULT);
@@ -30,7 +30,6 @@
update t1 set id = 10 where id =1;
update t1 set id = 11 where id =2;
update t1 set id = 12 where id =3;
-update t1 set id = 13 where id =4;
select * from t1;
select * from t2;
Index: update_delete_set_null.sql
===================================================================
RCS file:
/cvsroot/monetdb/sql/src/test/Update_Delete_action/Tests/update_delete_set_null.sql,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- update_delete_set_null.sql 2 Apr 2007 13:08:09 -0000 1.2
+++ update_delete_set_null.sql 8 Jun 2007 13:06:39 -0000 1.2.2.1
@@ -1,8 +1,8 @@
create table t1 (id int, name varchar(1024), PRIMARY KEY(id));
-create table t2 (id int, age int, PRIMARY KEY (ID), FOREIGN KEY(id) REFERENCES
t1(id) ON UPDATE SET NULL ON DELETE SET NULL);
+create table t2 (id int DEFAULT 10, age int, PRIMARY KEY (ID), FOREIGN KEY(id)
REFERENCES t1(id) ON UPDATE SET DEFAULT ON DELETE SET DEFAULT);
-create table t3 (id int DEFAULT 3, num int, FOREIGN KEY(id) REFERENCES t2(id)
ON DELETE SET DEFAULT ON UPDATE SET NULL);
+create table t3 (id int, num int, FOREIGN KEY(id) REFERENCES t2(id) ON DELETE
SET NULL ON UPDATE SET NULL);
@@ -26,16 +26,13 @@
insert into t3 values(4, 6);
insert into t3 values(5, 7);
-update t1 set id = 10 where id =1;
-update t1 set id = 11 where id =2;
-update t1 set id = 12 where id =3;
-update t1 set id = 13 where id =4;
+update t1 set id = 10 where id =3;
select * from t1;
select * from t2;
select * from t3;
-delete from t1 where id = 5;
+delete from t1 where id = 4;
select * from t1;
select * from t2;
Index: update_delete_set_null_crash.sql
===================================================================
RCS file:
/cvsroot/monetdb/sql/src/test/Update_Delete_action/Tests/update_delete_set_null_crash.sql,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -d -r1.3 -r1.3.2.1
--- update_delete_set_null_crash.sql 18 Apr 2007 16:18:49 -0000 1.3
+++ update_delete_set_null_crash.sql 8 Jun 2007 13:06:39 -0000 1.3.2.1
@@ -1,8 +1,8 @@
create table t1 (id int, name varchar(1024), PRIMARY KEY(id));
-create table t2 (id int NOT NULL, age int, PRIMARY KEY (id), FOREIGN KEY(id)
REFERENCES t1(id) ON UPDATE SET NULL ON DELETE SET NULL);
+create table t2 (id int DEFAULT 10, age int, PRIMARY KEY (id), FOREIGN KEY(id)
REFERENCES t1(id) ON UPDATE SET DEFAULT ON DELETE SET DEFAULT);
-create table t3 (id int DEFAULT 3, num int, FOREIGN KEY(id) REFERENCES t2(id)
ON DELETE SET DEFAULT ON UPDATE SET NULL);
+create table t3 (id int NOT NULL, num int, FOREIGN KEY(id) REFERENCES t2(id)
ON DELETE SET NULL ON UPDATE SET NULL);
@@ -25,16 +25,13 @@
insert into t3 values(4, 6);
insert into t3 values(5, 7);
-update t1 set id = 10 where id =1;
-update t1 set id = 11 where id =2;
-update t1 set id = 12 where id =3;
-update t1 set id = 13 where id =4;
+update t1 set id = 10 where id =3;
select * from t1;
select * from t2;
select * from t3;
-delete from t1 where id = 5;
+delete from t1 where id = 4;
select * from t1;
select * from t2;
Index: delete_cascade.sql
===================================================================
RCS file:
/cvsroot/monetdb/sql/src/test/Update_Delete_action/Tests/delete_cascade.sql,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -d -r1.3 -r1.3.2.1
--- delete_cascade.sql 18 Apr 2007 09:18:03 -0000 1.3
+++ delete_cascade.sql 8 Jun 2007 13:06:38 -0000 1.3.2.1
@@ -24,7 +24,7 @@
insert into t3 values(4, 6);
insert into t3 values(5, 7);
-delete from t1 where id > 2 and id < 5;
+delete from t1 where id > 1 and id < 5;
select * from t1;
select * from t2;
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins