| 1 |
# |
| 2 |
# Bug #20476395 DICT_LOAD_FOREIGNS() FAILED IN |
| 3 |
# COMMIT_INPLACE_ALTER_TABLE |
| 4 |
# |
| 5 |
call mtr.add_suppression("Failed to load table"); |
| 6 |
create database bug; |
| 7 |
use bug; |
| 8 |
create table parent(a serial) engine=innodb; |
| 9 |
create table child(a serial, foreign key fk (a) references parent(a)); |
| 10 |
insert into parent values(1); |
| 11 |
insert into child values(1); |
| 12 |
SET DEBUG_SYNC='innodb_rename_table_ready SIGNAL s1 WAIT_FOR s2 EXECUTE 2'; |
| 13 |
ALTER TABLE child ROW_FORMAT=DYNAMIC, ALGORITHM=COPY; |
| 14 |
SET DEBUG_SYNC='now WAIT_FOR s1'; |
| 15 |
SET DEBUG_SYNC='now SIGNAL s2 WAIT_FOR s1'; |
| 16 |
# Kill and restart |
| 17 |
show tables; |
| 18 |
Tables_in_bug |
| 19 |
child |
| 20 |
parent |
| 21 |
alter table parent row_format=dynamic; |
| 22 |
drop table child; |
| 23 |
drop table parent; |
| 24 |
drop database bug; |