Debian Codegraph @

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

raw
1 --source include/have_debug.inc
2
3 --echo #
4 --echo # Try various things when InnoDB runs out of free undo logs.
5 --echo #
6
7 --echo # These first three injection points are during DDL_Log removal
8 --echo # after a CREATE TABLE
9 --echo # Inject error #1
10 SET GLOBAL DEBUG='+d,DDL_Log_remove_inject_error_1';
11 --error ER_TOO_MANY_CONCURRENT_TRXS
12 CREATE TABLE t1 (f1 INT, f2 CHAR(6), KEY(f2));
13 SET GLOBAL DEBUG='-d,DDL_Log_remove_inject_error_1';
14
15 --echo # Try more DDL, restart, try more DDL
16 CREATE TABLE t9 (f1 INT, f2 CHAR(6), KEY(f2));
17 DROP TABLE t9;
18 --source include/restart_mysqld.inc
19 CREATE TABLE t9 (f1 INT, f2 CHAR(6), KEY(f2));
20 DROP TABLE t9;
21
22 --echo # Inject error #2
23 SET GLOBAL DEBUG='+d,DDL_Log_remove_inject_error_2';
24 --error ER_TOO_MANY_CONCURRENT_TRXS
25 CREATE TABLE t1 (f1 INT, f2 CHAR(6), KEY(f2));
26 SET GLOBAL DEBUG='-d,DDL_Log_remove_inject_error_2';
27
28 --echo # Try more DDL, restart, try more DDL
29 CREATE TABLE t9 (f1 INT, f2 CHAR(6), KEY(f2));
30 DROP TABLE t9;
31 --source include/restart_mysqld.inc
32 CREATE TABLE t9 (f1 INT, f2 CHAR(6), KEY(f2));
33 DROP TABLE t9;
34
35 --echo # Inject error #3
36 SET GLOBAL DEBUG='+d,DDL_Log_remove_inject_error_3';
37 --error ER_TOO_MANY_CONCURRENT_TRXS
38 CREATE TABLE t1 (f1 INT, f2 CHAR(6), KEY(f2));
39 SET GLOBAL DEBUG='-d,DDL_Log_remove_inject_error_3';
40
41 --echo # Try more DDL, restart, try more DDL
42 CREATE TABLE t9 (f1 INT, f2 CHAR(6), KEY(f2));
43 DROP TABLE t9;
44 --source include/restart_mysqld.inc
45 CREATE TABLE t9 (f1 INT, f2 CHAR(6), KEY(f2));
46 DROP TABLE t9;
47
48 --echo # These next two injection points are during DDL_Log removal
49 --echo # after a RENAME TABLE
50 CREATE TABLE t1 (f1 INT, f2 CHAR(6), KEY(f2));
51 --echo # Inject error #4
52 SET GLOBAL DEBUG='+d,DDL_Log_remove_inject_error_4';
53 --replace_regex /Error on rename of '.*' to '.*'/Error on rename of 'OLD_FILE_NAME' to 'NEW_FILE_NAME'/
54 --error ER_ERROR_ON_RENAME
55 ALTER TABLE t1 RENAME TO t2;
56 SET GLOBAL DEBUG='-d,DDL_Log_remove_inject_error_4';
57 ALTER TABLE t1 RENAME TO t2;
58
59 --echo # Try more DDL, restart, try more DDL
60 CREATE TABLE t9 (f1 INT, f2 CHAR(6), KEY(f2));
61 DROP TABLE t9;
62 --source include/restart_mysqld.inc
63 CREATE TABLE t9 (f1 INT, f2 CHAR(6), KEY(f2));
64 DROP TABLE t9;
65
66 --echo # Inject error #5
67 SET GLOBAL DEBUG='+d,DDL_Log_remove_inject_error_5';
68 --replace_regex /Error on rename of '.*' to '.*'/Error on rename of 'OLD_FILE_NAME' to 'NEW_FILE_NAME'/
69 --error ER_ERROR_ON_RENAME
70 ALTER TABLE t2 RENAME TO t1;
71 SET GLOBAL DEBUG='-d,DDL_Log_remove_inject_error_5';
72 ALTER TABLE t2 RENAME TO t1;
73 DROP TABLE t1;
74
75 --echo # Try more DDL, restart, try more DDL
76 CREATE TABLE t9 (f1 INT, f2 CHAR(6), KEY(f2));
77 DROP TABLE t9;
78 --source include/restart_mysqld.inc
79 CREATE TABLE t9 (f1 INT, f2 CHAR(6), KEY(f2));
80 DROP TABLE t9;
81
82 --disable_query_log
83 call mtr.add_suppression("\\[ERROR\\] .* Too many concurrent transactions while clearing the DDL Log. Please increase the number of Rollback Segments");
84 --enable_query_log