1 --source include/have_innodb_plugin.inc
2 --source include/have_debug_sync.inc
3 --source include/not_embedded.inc
4 # InnoDB Plugin cannot use DEBUG_SYNC on Windows
5 --source include/not_windows.inc
7 SET DEBUG_SYNC='reset';
9 # Save the initial number of concurrent sessions
10 --source include/count_sessions.inc
12 create table t1 (f1 integer, key k1 (f1)) engine=innodb;
13 create table t2 (f1 int, f2 int, key(f1), key(f2)) engine=innodb;
14 create table t3 (f2 int, key(f2)) engine=innodb;
16 insert into t1 values (10);
17 insert into t2 values (10, 20);
18 insert into t3 values (20);
20 alter table t2 add constraint c1 foreign key (f1)
21 references t1(f1) on update cascade;
27 SET DEBUG_SYNC='alter_table_before_rename_result_table
28 SIGNAL update_can_proceed WAIT_FOR dict_unfreeze';
31 alter table t2 add constraint z1 foreign key (f2)
32 references t3(f2) on update cascade;
34 connect (thr2,localhost,root,,);
37 SET DEBUG_SYNC='innodb_row_update_for_mysql_begin
38 WAIT_FOR update_can_proceed';
39 SET DEBUG_SYNC='innodb_dml_cascade_dict_unfreeze SIGNAL dict_unfreeze
40 WAIT_FOR foreign_free_cache';
43 update ignore t1 set f1 = 20;
46 --replace_regex /'[^']*test\/#sql2-[0-9a-f-]*'/'#sql2-temporary'/
47 --error ER_ERROR_ON_RENAME
50 SET DEBUG_SYNC='now SIGNAL foreign_free_cache';
55 --source include/wait_until_disconnected.inc
63 # Wait till we reached the initial number of concurrent sessions
64 --source include/wait_until_count_sessions.inc
66 SET DEBUG_SYNC='reset';