| 1 |
--source include/have_innodb.inc |
| 2 |
--source include/have_sequence.inc |
| 3 |
--source include/have_debug.inc |
| 4 |
--source include/not_embedded.inc |
| 5 |
|
| 6 |
call mtr.add_suppression("InnoDB: Cannot free the unused segments in system tablespace because a previous shutdown was not with innodb_fast_shutdown=0"); |
| 7 |
call mtr.add_suppression("InnoDB: :autoshrink failed to read the used segment"); |
| 8 |
call mtr.add_suppression("InnoDB: :autoshrink failed due to .* in FSP_SEG_INODES_FULL list"); |
| 9 |
call mtr.add_suppression("InnoDB: :autoshrink failed due to .* in FSP_SEG_INODES_FREE list"); |
| 10 |
call mtr.add_suppression("InnoDB: :autoshrink failed to free the segment"); |
| 11 |
call mtr.add_suppression("Found .* prepared XA transactions"); |
| 12 |
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0; |
| 13 |
|
| 14 |
SET GLOBAL INNODB_FILE_PER_TABLE=0; |
| 15 |
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL)STATS_PERSISTENT=0, ENGINE=InnoDB; |
| 16 |
XA START 'x'; |
| 17 |
insert into t1 values (1, 1); |
| 18 |
XA END 'x'; |
| 19 |
XA PREPARE 'x'; |
| 20 |
set GLOBAL innodb_fast_shutdown=0; |
| 21 |
--source include/restart_mysqld.inc |
| 22 |
--echo # Fail to free the segment due to XA PREPARE transaction |
| 23 |
let SEARCH_PATTERN= InnoDB: Cannot free the unused segments in system tablespace because a previous shutdown was not with innodb_fast_shutdown=0; |
| 24 |
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
| 25 |
--source include/search_pattern_in_file.inc |
| 26 |
XA COMMIT 'x'; |
| 27 |
DROP TABLE t1; |
| 28 |
|
| 29 |
let $restart_parameters=--debug_dbug=d,undo_segment_leak; |
| 30 |
--source include/restart_mysqld.inc |
| 31 |
SET GLOBAL INNODB_FILE_PER_TABLE=0; |
| 32 |
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL)STATS_PERSISTENT=0, ENGINE=InnoDB; |
| 33 |
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096; |
| 34 |
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096; |
| 35 |
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096; |
| 36 |
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096; |
| 37 |
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096; |
| 38 |
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096; |
| 39 |
UPDATE t1 SET f1 = f1 + 1 WHERE f1 > 1000; |
| 40 |
UPDATE t1 SET f2 = f2 + 1 WHERE f1 > 1000; |
| 41 |
UPDATE t1 SET f1 = f2 + 1 WHERE f1 > 1000; |
| 42 |
UPDATE t1 SET f2 = f1 + 1 WHERE f1 > 1000; |
| 43 |
DELETE FROM t1; |
| 44 |
DROP TABLE t1; |
| 45 |
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0; |
| 46 |
let $shutdown_timeout=0; |
| 47 |
let $restart_parameters=--debug_dbug=d,unused_undo_free_fail_1; |
| 48 |
--source include/restart_mysqld.inc |
| 49 |
|
| 50 |
let $shutdown_timeout=; |
| 51 |
--echo # Fail to free the segment due to previous shutdown |
| 52 |
--let SEARCH_PATTERN= InnoDB: Cannot free the unused segments in system tablespace because a previous shutdown was not with innodb_fast_shutdown=0.* |
| 53 |
|
| 54 |
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
| 55 |
--source include/search_pattern_in_file.inc |
| 56 |
|
| 57 |
SELECT NAME, IF(file_size>=14680064,'ok',file_size) |
| 58 |
FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0; |
| 59 |
SET GLOBAL innodb_fast_shutdown= 0; |
| 60 |
|
| 61 |
--echo # Fail to free the segment while finding the used segments |
| 62 |
let $restart_parameters=--debug_dbug=d,unused_undo_free_fail_2; |
| 63 |
--source include/restart_mysqld.inc |
| 64 |
SELECT IF(file_size>10485760,'ok',file_size) FROM information_schema.innodb_sys_tablespaces WHERE space=0; |
| 65 |
let SEARCH_PATTERN= InnoDB: :autoshrink failed to read the used segment; |
| 66 |
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
| 67 |
--source include/search_pattern_in_file.inc |
| 68 |
|
| 69 |
let SEARCH_PATTERN= InnoDB: :autoshrink failed due to .* in FSP_SEG_INODES_FULL list; |
| 70 |
--source include/search_pattern_in_file.inc |
| 71 |
SET GLOBAL innodb_fast_shutdown= 0; |
| 72 |
|
| 73 |
--echo # Fail to free the segment while finding the used segments |
| 74 |
let $restart_parameters=--debug_dbug=d,unused_undo_free_fail_3; |
| 75 |
--source include/restart_mysqld.inc |
| 76 |
SELECT IF(file_size>10485760,'ok',file_size) FROM information_schema.innodb_sys_tablespaces WHERE space=0; |
| 77 |
|
| 78 |
let SEARCH_PATTERN= InnoDB: :autoshrink failed due to .* in FSP_SEG_INODES_FREE list; |
| 79 |
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
| 80 |
--source include/search_pattern_in_file.inc |
| 81 |
SET GLOBAL innodb_fast_shutdown= 0; |
| 82 |
|
| 83 |
--echo # Fail to free the segment while freeing the unused segments |
| 84 |
let $restart_parameters=--debug_dbug=d,unused_undo_free_fail_4; |
| 85 |
--source include/restart_mysqld.inc |
| 86 |
SELECT IF(file_size>10485760,'ok',file_size) FROM information_schema.innodb_sys_tablespaces WHERE space=0; |
| 87 |
|
| 88 |
let SEARCH_PATTERN= InnoDB: :autoshrink failed to free the segment .* in page .*; |
| 89 |
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
| 90 |
--source include/search_pattern_in_file.inc |
| 91 |
|
| 92 |
SET GLOBAL innodb_fast_shutdown= 0; |
| 93 |
|
| 94 |
--echo # Fail to free the segment while freeing the used segments |
| 95 |
let $restart_parameters=--debug_dbug=d,unused_undo_free_fail_5; |
| 96 |
--source include/restart_mysqld.inc |
| 97 |
SELECT IF(file_size>10485760,'ok',file_size) FROM information_schema.innodb_sys_tablespaces WHERE space=0; |
| 98 |
|
| 99 |
let SEARCH_PATTERN= InnoDB: :autoshrink failed to free the segment .* in page .*; |
| 100 |
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
| 101 |
--source include/search_pattern_in_file.inc |
| 102 |
|
| 103 |
SET GLOBAL innodb_fast_shutdown= 0; |
| 104 |
let $restart_parameters=; |
| 105 |
--source include/restart_mysqld.inc |
| 106 |
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0; |
| 107 |
|
| 108 |
--echo # Fail to reset the TRX_SYS_FSEG_HEADER during undo tablespace |
| 109 |
--echo # reinitialization. garbage_collect() shouldn't free the |
| 110 |
--echo # TRX_SYS_FSEG_HEADER index node |
| 111 |
set global innodb_fast_shutdown=0; |
| 112 |
let $restart_parameters=--innodb_undo_tablespaces=2 --debug_dbug=d,sys_fseg_header_fail; |
| 113 |
--source include/restart_mysqld.inc |
| 114 |
let SEARCH_PATTERN= InnoDB: :autoshrink freed the segment .* in page .*; |
| 115 |
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
| 116 |
--source include/search_pattern_in_file.inc |
| 117 |
let $restart_parameters=; |
| 118 |
set global innodb_fast_shutdown=0; |
| 119 |
--source include/restart_mysqld.inc |
| 120 |
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0; |