summaryrefslogtreecommitdiff
path: root/mysql-test/t/innodb.test
diff options
context:
space:
mode:
authoraivanov@mysql.com <>2005-12-13 21:35:24 +0300
committeraivanov@mysql.com <>2005-12-13 21:35:24 +0300
commit2e499986aa001f9b2143a51e075c4342cbec2718 (patch)
tree7a6cff8fdb54472ba07a9cea2610e458af775dd2 /mysql-test/t/innodb.test
parent594eb6cf6c120062cd4f17589badeaf49d63b75b (diff)
downloadmariadb-git-2e499986aa001f9b2143a51e075c4342cbec2718.tar.gz
Fix BUG#12071: "Windows hang:'Opening tables' or 'Waiting for
table' lockup". Changes from the innodb-5.0-ss92 snapshot. Do not call os_file_create_tmpfile() at runtime. Instead, create all tempfiles at startup and guard access to them with mutexes.
Diffstat (limited to 'mysql-test/t/innodb.test')
-rw-r--r--mysql-test/t/innodb.test34
1 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index 735deba2b05..887d8193157 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -1833,4 +1833,38 @@ create table t1 (a varchar(255) character set utf8,
e varchar(255) character set utf8,
key (a,b,c,d,e)) engine=innodb;
+# test that foreign key errors are reported correctly (Bug #15550)
+
+create table t1(a int primary key) row_format=redundant engine=innodb;
+create table t2(a int primary key,constraint foreign key(a)references t1(a)) row_format=compact engine=innodb;
+create table t3(a int primary key) row_format=compact engine=innodb;
+create table t4(a int primary key,constraint foreign key(a)references t3(a)) row_format=redundant engine=innodb;
+
+insert into t1 values(1);
+insert into t3 values(1);
+-- error 1452
+insert into t2 values(2);
+-- error 1452
+insert into t4 values(2);
+insert into t2 values(1);
+insert into t4 values(1);
+-- error 1451
+update t1 set a=2;
+-- error 1452
+update t2 set a=2;
+-- error 1451
+update t3 set a=2;
+-- error 1452
+update t4 set a=2;
+-- error 1451
+truncate t1;
+-- error 1451
+truncate t3;
+truncate t2;
+truncate t4;
+truncate t1;
+truncate t3;
+
+drop table t4,t3,t2,t1;
+
--echo End of 5.0 tests