summaryrefslogtreecommitdiff
path: root/mysql-test/t/innodb.test
diff options
context:
space:
mode:
authorunknown <aivanov@mysql.com>2005-12-13 21:35:24 +0300
committerunknown <aivanov@mysql.com>2005-12-13 21:35:24 +0300
commit778d212b8ceb266c4c8cd2276fcf548c4c0851a3 (patch)
tree7a6cff8fdb54472ba07a9cea2610e458af775dd2 /mysql-test/t/innodb.test
parent3bef007191f1e26a68f34c085f6d6611f5a9c388 (diff)
downloadmariadb-git-778d212b8ceb266c4c8cd2276fcf548c4c0851a3.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. innobase/btr/btr0sea.c: Changes from the innodb-5.0ss92 snapshot. innobase/include/buf0buf.h: Changes from the innodb-5.0ss92 snapshot. innobase/include/os0file.h: Changes from the innodb-5.0ss92 snapshot. innobase/include/srv0srv.h: Changes from the innodb-5.0ss92 snapshot. innobase/row/row0ins.c: Changes from the innodb-5.0ss92 snapshot. innobase/srv/srv0srv.c: Changes from the innodb-5.0ss92 snapshot. innobase/srv/srv0start.c: Changes from the innodb-5.0ss92 snapshot. mysql-test/r/innodb.result: Changes from the innodb-5.0ss92 snapshot. mysql-test/t/innodb.test: Changes from the innodb-5.0ss92 snapshot. sql/ha_innodb.cc: Changes from the innodb-5.0ss92 snapshot.
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