| 1 |
# |
| 2 |
# Bug #20762798 FK DDL: CRASH IN DICT_FOREIGN_REMOVE_FROM_CACHE |
| 3 |
# |
| 4 |
create table t1(a int, b int, key(a),key(b))engine=innodb; |
| 5 |
create table t2(a int, b int, key(a),key(b))engine=innodb; |
| 6 |
alter table t2 add constraint b foreign key (b) references t1(a); |
| 7 |
alter table t1 add constraint b1 foreign key (b) references t2(a); |
| 8 |
alter table t2 add constraint b1 foreign key (b) references t1(a); |
| 9 |
ERROR HY000: Can't create table `test`.`t2` (errno: 121 "Duplicate key on write or update") |
| 10 |
alter table t2 drop foreign key b; |
| 11 |
alter table t1 drop foreign key b1; |
| 12 |
drop table t2; |
| 13 |
drop table t1; |