Debian Codegraph @

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

raw
1 --source include/have_innodb.inc
2 #
3 # http://bugs.mysql.com/53046
4 # dict_update_statistics_low can still be run concurrently on same table
5 #
6 # This is a symbolic test, it would not fail if the bug is present.
7 #
8
9 CREATE TABLE bug53046_1 (c1 INT PRIMARY KEY) ENGINE=INNODB;
10 CREATE TABLE bug53046_2 (c2 INT PRIMARY KEY,
11 FOREIGN KEY (c2) REFERENCES bug53046_1(c1)
12 ON UPDATE CASCADE ON DELETE CASCADE) ENGINE=INNODB;
13
14 INSERT INTO bug53046_1 VALUES (1);
15 let $i = 5;
16 while ($i) {
17 eval INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1)
18 FROM bug53046_1;
19 dec $i;
20 }
21
22 INSERT INTO bug53046_2 VALUES (1), (2);
23
24 # CREATE TABLE innodb_table_monitor (a int) ENGINE=INNODB;
25 # wait more than 1 minute and observe the mysqld output
26 # DROP TABLE innodb_table_monitor;
27
28 ANALYZE TABLE bug53046_1;
29
30 # this prints create time and other nondeterministic data
31 -- disable_result_log
32 SHOW TABLE STATUS LIKE 'bug53046_1';
33 -- enable_result_log
34
35 UPDATE bug53046_1 SET c1 = c1 - 1;
36
37 DELETE FROM bug53046_1;
38
39 INSERT INTO bug53046_1 VALUES (1);
40 INSERT INTO bug53046_2 VALUES (1);
41 TRUNCATE TABLE bug53046_2;
42
43 DROP TABLE bug53046_2;
44 DROP TABLE bug53046_1;