Debian Codegraph @

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

raw
1 #
2 # http://bugs.mysql.com/53046
3 # dict_update_statistics_low can still be run concurrently on same table
4 #
5 # This is a symbolic test, it would not fail if the bug is present.
6 # Rather those SQL commands have been used during manual testing under
7 # innodb_sync_debug to test all changed codepaths for locking
8 # correctness.
9 #
10
11
12 CREATE TABLE bug53046_1 (c1 INT PRIMARY KEY) ENGINE=INNODB;
13 CREATE TABLE bug53046_2 (c2 INT PRIMARY KEY,
14 FOREIGN KEY (c2) REFERENCES bug53046_1(c1)
15 ON UPDATE CASCADE ON DELETE CASCADE) ENGINE=INNODB;
16
17 INSERT INTO bug53046_1 VALUES (1);
18 let $i = 5;
19 while ($i) {
20 eval INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1)
21 FROM bug53046_1;
22 dec $i;
23 }
24
25 INSERT INTO bug53046_2 VALUES (1), (2);
26 ANALYZE TABLE bug53046_1;
27
28 # this prints create time and other nondeterministic data
29 -- disable_result_log
30 SHOW TABLE STATUS LIKE 'bug53046_1';
31 -- enable_result_log
32
33 UPDATE bug53046_1 SET c1 = c1 - 1;
34
35 DELETE FROM bug53046_1;
36
37 INSERT INTO bug53046_1 VALUES (1);
38 INSERT INTO bug53046_2 VALUES (1);
39 TRUNCATE TABLE bug53046_2;
40
41 DROP TABLE bug53046_2;
42 DROP TABLE bug53046_1;