From 2100d85c4feac93aae349ca5666e638dba3ea807 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 22 Feb 2004 09:58:51 +0200 Subject: Move tests that uses innodb to innodb.test mysql-test/t/lock_tables_lost_commit.test: Ensure that innodb is compiled in --- mysql-test/t/innodb.test | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'mysql-test/t/innodb.test') diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index ec9aa83ae16..04642ddd619 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -878,3 +878,21 @@ CREATE TABLE t1 (`id 1` INT NOT NULL, PRIMARY KEY (`id 1`)) TYPE=INNODB; CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (`t1_id`) REFERENCES `t1`(`id 1`) ON DELETE CASCADE ) TYPE=INNODB; #show create table t2; drop table t2,t1; + +# +# Test of multi updated and foreign keys +# + +create table `t1` (`id` int( 11 ) not null ,primary key ( `id` )) type = innodb; +insert into `t1`values ( 1 ) ; +create table `t2` (`id` int( 11 ) not null default '0',unique key `id` ( `id` ) ,constraint `t1_id_fk` foreign key ( `id` ) references `t1` (`id` )) type = innodb; +insert into `t2`values ( 1 ) ; +create table `t3` (`id` int( 11 ) not null default '0',key `id` ( `id` ) ,constraint `t2_id_fk` foreign key ( `id` ) references `t2` (`id` )) type = innodb; +insert into `t3`values ( 1 ) ; +--error 1217 +delete t3,t2,t1 from t1,t2,t3 where t1.id =1 and t2.id = t1.id and t3.id = t2.id; +--error 1217 +update t1,t2,t3 set t3.id=5, t2.id=6, t1.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id; +--error 1109 +update t3 set t3.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id; +drop table t3,t2,t1; -- cgit v1.2.1