| 1 |
--source include/have_innodb.inc |
| 2 |
|
| 3 |
--echo # |
| 4 |
--echo # Bug #20762798 FK DDL: CRASH IN DICT_FOREIGN_REMOVE_FROM_CACHE |
| 5 |
--echo # |
| 6 |
|
| 7 |
create table t1(a int, b int, key(a),key(b))engine=innodb; |
| 8 |
create table t2(a int, b int, key(a),key(b))engine=innodb; |
| 9 |
|
| 10 |
alter table t2 add constraint b foreign key (b) references t1(a); |
| 11 |
alter table t1 add constraint b1 foreign key (b) references t2(a); |
| 12 |
|
| 13 |
--error ER_CANT_CREATE_TABLE |
| 14 |
alter table t2 add constraint b1 foreign key (b) references t1(a); |
| 15 |
|
| 16 |
alter table t2 drop foreign key b; |
| 17 |
alter table t1 drop foreign key b1; |
| 18 |
|
| 19 |
drop table t2; |
| 20 |
drop table t1; |