Commit 7f125257 authored by Alice Sherepa's avatar Alice Sherepa

++

parent 96fa29cd
......@@ -16,7 +16,7 @@ CREATE TABLE t2 (
c2 INT PRIMARY KEY,
CONSTRAINT t2c2 FOREIGN KEY (c2) REFERENCES t1 (c2))
ENGINE = InnoDB;
ERROR HY000: Cannot add foreign key constraint
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
SET DEBUG_SYNC = 'now SIGNAL fk';
# Session default
/* reap */ DROP INDEX c2 ON t1;
......@@ -24,6 +24,6 @@ CREATE TABLE t2 (
c2 INT PRIMARY KEY,
CONSTRAINT t2c2 FOREIGN KEY (c2) REFERENCES t1 (c2))
ENGINE = InnoDB;
ERROR HY000: Cannot add foreign key constraint
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
SET DEBUG_SYNC='RESET';
DROP TABLE t1;
......@@ -10,3 +10,4 @@ insert into t1 values(NULL);
set debug_sync='now SIGNAL continue_others';
# Now all 40 connections can finish the insert operation on t1.
drop table t1;
SET DEBUG_SYNC='RESET';
......@@ -28,7 +28,7 @@ connect (con1,localhost,root,,);
connection con1;
SET DEBUG_SYNC = 'now WAIT_FOR drop';
--error ER_CANNOT_ADD_FOREIGN
--error ER_CANT_CREATE_TABLE
CREATE TABLE t2 (
c2 INT PRIMARY KEY,
CONSTRAINT t2c2 FOREIGN KEY (c2) REFERENCES t1 (c2))
......@@ -42,7 +42,7 @@ connection default;
--echo /* reap */ DROP INDEX c2 ON t1;
reap;
--error ER_CANNOT_ADD_FOREIGN
--error ER_CANT_CREATE_TABLE
CREATE TABLE t2 (
c2 INT PRIMARY KEY,
CONSTRAINT t2c2 FOREIGN KEY (c2) REFERENCES t1 (c2))
......
--source include/have_innodb.inc
--source include/have_partition.inc
CREATE TABLE t (id INT, a INT, b INT, KEY (a), KEY (b)) ENGINE=INNODB
PARTITION BY HASH (id) PARTITIONS 10;
......
......@@ -45,3 +45,4 @@ while ($1 < 40) {
drop table t1;
--source include/wait_until_count_sessions.inc
SET DEBUG_SYNC='RESET';
--source include/have_innodb.inc
--source include/have_partition.inc
--source include/not_embedded.inc
--source include/big_test.inc
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment