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

++

parent 96fa29cd
...@@ -16,7 +16,7 @@ CREATE TABLE t2 ( ...@@ -16,7 +16,7 @@ CREATE TABLE t2 (
c2 INT PRIMARY KEY, c2 INT PRIMARY KEY,
CONSTRAINT t2c2 FOREIGN KEY (c2) REFERENCES t1 (c2)) CONSTRAINT t2c2 FOREIGN KEY (c2) REFERENCES t1 (c2))
ENGINE = InnoDB; 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'; SET DEBUG_SYNC = 'now SIGNAL fk';
# Session default # Session default
/* reap */ DROP INDEX c2 ON t1; /* reap */ DROP INDEX c2 ON t1;
...@@ -24,6 +24,6 @@ CREATE TABLE t2 ( ...@@ -24,6 +24,6 @@ CREATE TABLE t2 (
c2 INT PRIMARY KEY, c2 INT PRIMARY KEY,
CONSTRAINT t2c2 FOREIGN KEY (c2) REFERENCES t1 (c2)) CONSTRAINT t2c2 FOREIGN KEY (c2) REFERENCES t1 (c2))
ENGINE = InnoDB; 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'; SET DEBUG_SYNC='RESET';
DROP TABLE t1; DROP TABLE t1;
...@@ -10,3 +10,4 @@ insert into t1 values(NULL); ...@@ -10,3 +10,4 @@ insert into t1 values(NULL);
set debug_sync='now SIGNAL continue_others'; set debug_sync='now SIGNAL continue_others';
# Now all 40 connections can finish the insert operation on t1. # Now all 40 connections can finish the insert operation on t1.
drop table t1; drop table t1;
SET DEBUG_SYNC='RESET';
...@@ -28,7 +28,7 @@ connect (con1,localhost,root,,); ...@@ -28,7 +28,7 @@ connect (con1,localhost,root,,);
connection con1; connection con1;
SET DEBUG_SYNC = 'now WAIT_FOR drop'; SET DEBUG_SYNC = 'now WAIT_FOR drop';
--error ER_CANNOT_ADD_FOREIGN --error ER_CANT_CREATE_TABLE
CREATE TABLE t2 ( CREATE TABLE t2 (
c2 INT PRIMARY KEY, c2 INT PRIMARY KEY,
CONSTRAINT t2c2 FOREIGN KEY (c2) REFERENCES t1 (c2)) CONSTRAINT t2c2 FOREIGN KEY (c2) REFERENCES t1 (c2))
...@@ -42,7 +42,7 @@ connection default; ...@@ -42,7 +42,7 @@ connection default;
--echo /* reap */ DROP INDEX c2 ON t1; --echo /* reap */ DROP INDEX c2 ON t1;
reap; reap;
--error ER_CANNOT_ADD_FOREIGN --error ER_CANT_CREATE_TABLE
CREATE TABLE t2 ( CREATE TABLE t2 (
c2 INT PRIMARY KEY, c2 INT PRIMARY KEY,
CONSTRAINT t2c2 FOREIGN KEY (c2) REFERENCES t1 (c2)) CONSTRAINT t2c2 FOREIGN KEY (c2) REFERENCES t1 (c2))
......
--source include/have_innodb.inc --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 CREATE TABLE t (id INT, a INT, b INT, KEY (a), KEY (b)) ENGINE=INNODB
PARTITION BY HASH (id) PARTITIONS 10; PARTITION BY HASH (id) PARTITIONS 10;
......
...@@ -45,3 +45,4 @@ while ($1 < 40) { ...@@ -45,3 +45,4 @@ while ($1 < 40) {
drop table t1; drop table t1;
--source include/wait_until_count_sessions.inc --source include/wait_until_count_sessions.inc
SET DEBUG_SYNC='RESET';
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_partition.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/big_test.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