mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / suite / innodb_plugin / t / innodb_bug13635833.test
blob5db7a41e2014bf788659900c983e3e6085f3f72a
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;
23 show create table t1;
24 show create table t2;
25 show create table t3;
27 SET DEBUG_SYNC='alter_table_before_rename_result_table
28    SIGNAL update_can_proceed WAIT_FOR dict_unfreeze';
30 --send
31 alter table t2 add constraint z1 foreign key (f2)
32     references t3(f2) on update cascade;
34 connect (thr2,localhost,root,,);
35 connection thr2;
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';
42 --send
43 update ignore t1 set f1 = 20;
45 connection default;
46 --replace_regex /'[^']*test\/#sql2-[0-9a-f-]*'/'#sql2-temporary'/
47 --error ER_ERROR_ON_RENAME
48 reap;
50 SET DEBUG_SYNC='now SIGNAL foreign_free_cache';
52 connection thr2;
53 reap;
54 disconnect thr2;
55 --source include/wait_until_disconnected.inc
57 connection default;
59 drop table t2;
60 drop table t1;
61 drop table t3;
63 # Wait till we reached the initial number of concurrent sessions
64 --source include/wait_until_count_sessions.inc
66 SET DEBUG_SYNC='reset';