Update of /cvsroot/monetdb/sql/src/test/Update_Delete_action/Tests
In directory sc8-pr-cvs16:/tmp/cvs-serv20702
Modified Files:
delete_restrict.sql update_set_default_crash.sql
Log Message:
Correct some tests
Index: update_set_default_crash.sql
===================================================================
RCS file:
/cvsroot/monetdb/sql/src/test/Update_Delete_action/Tests/update_set_default_crash.sql,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- update_set_default_crash.sql 18 Apr 2007 16:18:50 -0000 1.3
+++ update_set_default_crash.sql 3 May 2007 14:06:55 -0000 1.4
@@ -1,8 +1,8 @@
create table t1 (id int, name varchar(1024), PRIMARY KEY(id));
-create table t2 (id int DEFAULT 3, age int, PRIMARY KEY (id), FOREIGN KEY(id)
REFERENCES t1(id) ON DELETE SET DEFAULT);
+create table t2 (id int DEFAULT 3, age int, PRIMARY KEY (id), FOREIGN KEY(id)
REFERENCES t1(id) ON DELETE SET DEFAULT ON UPDATE SET NULL);
-create table t3 (id int DEFAULT 30, num int, FOREIGN KEY(id) REFERENCES t2(id)
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);
@@ -26,53 +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;
+delete from t1 where id = 4;
select * from t1;
select * from t2;
select * from t3;
-drop table t3;
-drop table t2;
-drop table t1;
-
----second round
-
-create table t1 (id int, name varchar(1024), PRIMARY KEY(id));
-
-create table t2 (id int DEFAULT 3, age int, PRIMARY KEY (id), FOREIGN KEY(id)
REFERENCES t1(id) ON DELETE SET DEFAULT);
-
-create table t3 (id int DEFAULT 3, num int, FOREIGN KEY(id) REFERENCES t2(id)
ON DELETE SET DEFAULT);
-
-
-
-insert into t1 values(1, 'monetdb');
-insert into t1 values(2, 'mon');
-insert into t1 values(3, 'monb');
-insert into t1 values(4, 'motdb');
-insert into t1 values(5, 'mob');
-insert into t1 values(6, 'moetdb');
-insert into t1 values(7, 'mo');
-
-insert into t2 values(1, 23);
-insert into t2 values(2, 24);
-insert into t2 values(3, 25);
-insert into t2 values(4, 26);
-insert into t2 values(5, 27);
-
-
-insert into t3 values(3, 5);
-insert into t3 values(3, 5);
-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;
select * from t1;
select * from t2;
Index: delete_restrict.sql
===================================================================
RCS file:
/cvsroot/monetdb/sql/src/test/Update_Delete_action/Tests/delete_restrict.sql,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- delete_restrict.sql 18 Apr 2007 16:18:48 -0000 1.4
+++ delete_restrict.sql 3 May 2007 14:06:52 -0000 1.5
@@ -47,4 +47,3 @@
drop table t3;
drop table t2;
drop table t1;
-
-------------------------------------------------------------------------
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