Debian Codegraph @

mysql-test/suite/innodb/t/innodb_stats_race_condition.test

raw
1 --echo #
2 --echo # Bug #33135425 RACE CONDITION LEADING TO ASSERTION ON UNINITIALIZED STATS
3 --echo #
4
5 --source include/have_debug.inc
6 set global table_open_cache = 16;
7
8 create table t (i int, j int, primary key(i), key(j));
9 create table u (i int, j int, primary key(i), key(j));
10
11 connect(con1,localhost,root,,);
12 connect(con2,localhost,root,,);
13
14 connection con1;
15
16 select * from t;
17 select * from u;
18 select * from t;
19 select * from u;
20 select * from t;
21
22 connection con2;
23 SET DEBUG_SYNC = 'after_open_tables SIGNAL c0 WAIT_FOR c1';
24 SET DEBUG_SYNC = 'innodb.after_init_check SIGNAL c2 WAIT_FOR c3';
25 send show keys in t;
26
27 connection con1;
28 SET DEBUG_SYNC = 'now WAIT_FOR c0';
29 # With the fix the debug sync value would just timeout
30 SET DEBUG_SYNC = 'innodb.before_stats_deinit SIGNAL c1 WAIT_FOR c2 TIMEOUT 5 ';
31 send select * from u;
32
33 connection con1;
34 reap;
35 SET DEBUG_SYNC = 'now SIGNAL c3';
36
37 connection con2;
38 reap;
39
40 connection default;
41 disconnect con1;
42 disconnect con2;
43 SET DEBUG_SYNC ='RESET';
44
45 drop table t,u;
46 set global table_open_cache = default;