| 1 |
--source include/have_innodb.inc |
| 2 |
--source include/have_debug.inc |
| 3 |
--source include/have_sequence.inc |
| 4 |
|
| 5 |
call mtr.add_suppression("InnoDB: Defragmentation of CLUST_IND in SYS_INDEXES failed: Data structure corruption"); |
| 6 |
call mtr.add_suppression("InnoDB: Defragmentation of CLUST_IND in SYS_COLUMNS failed: Data structure corruption"); |
| 7 |
call mtr.add_suppression("InnoDB: Cannot free the unused segments in system tablespace"); |
| 8 |
|
| 9 |
--let MYSQLD_DATADIR= `SELECT @@datadir` |
| 10 |
--source include/shutdown_mysqld.inc |
| 11 |
--copy_file $MYSQLD_DATADIR/ibdata1 $MYSQLD_DATADIR/ibdata1_copy |
| 12 |
--copy_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile0_copy |
| 13 |
--source include/start_mysqld.inc |
| 14 |
|
| 15 |
set GLOBAL innodb_file_per_table = 0; |
| 16 |
set GLOBAL innodb_limit_optimistic_insert_debug = 2; |
| 17 |
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL)ENGINE=InnoDB; |
| 18 |
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096; |
| 19 |
|
| 20 |
SET GLOBAL innodb_file_per_table= 1; |
| 21 |
CREATE TABLE t2(f1 INT NOT NULL PRIMARY KEY, |
| 22 |
f2 VARCHAR(40))ENGINE=InnoDB PARTITION BY KEY() PARTITIONS 256; |
| 23 |
|
| 24 |
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096; |
| 25 |
DROP TABLE t2; |
| 26 |
|
| 27 |
--source include/wait_all_purged.inc |
| 28 |
let $restart_parameters=; |
| 29 |
--source include/restart_mysqld.inc |
| 30 |
|
| 31 |
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
| 32 |
let SEARCH_PATTERN=InnoDB: Found unexpected table in system tablespace: test\/t1; |
| 33 |
--source include/search_pattern_in_file.inc |
| 34 |
DROP TABLE t1; |
| 35 |
|
| 36 |
--source include/wait_all_purged.inc |
| 37 |
let $fsize=`select file_size from information_schema.innodb_sys_tablespaces where space = 0`; |
| 38 |
|
| 39 |
let $restart_parameters=--debug_dbug=+d,fail_after_level_defragment; |
| 40 |
--source include/restart_mysqld.inc |
| 41 |
|
| 42 |
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
| 43 |
let SEARCH_PATTERN=InnoDB: Defragmentation of CLUST_IND in SYS_COLUMNS failed.; |
| 44 |
--source include/search_pattern_in_file.inc |
| 45 |
|
| 46 |
evalp select name, file_size<$fsize shrunk |
| 47 |
from information_schema.innodb_sys_tablespaces where space=0; |
| 48 |
|
| 49 |
let $restart_parameters=--debug_dbug=d,allocation_prepare_fail; |
| 50 |
--source include/restart_mysqld.inc |
| 51 |
|
| 52 |
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
| 53 |
let SEARCH_PATTERN=InnoDB: Defragmentation of CLUST_IND in SYS_INDEXES failed.; |
| 54 |
--source include/search_pattern_in_file.inc |
| 55 |
|
| 56 |
evalp select name, file_size<$fsize shrunk |
| 57 |
from information_schema.innodb_sys_tablespaces where space=0; |
| 58 |
|
| 59 |
let $restart_parameters=--debug_dbug=d,relation_page_prepare_fail; |
| 60 |
--source include/restart_mysqld.inc |
| 61 |
|
| 62 |
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
| 63 |
let SEARCH_PATTERN=InnoDB: Defragmentation of CLUST_IND in SYS_INDEXES failed.; |
| 64 |
--source include/search_pattern_in_file.inc |
| 65 |
|
| 66 |
evalp select name, file_size<$fsize shrunk |
| 67 |
from information_schema.innodb_sys_tablespaces where space=0; |
| 68 |
|
| 69 |
let $restart_parameters=--debug_dbug=d,remover_prepare_fail; |
| 70 |
--source include/restart_mysqld.inc |
| 71 |
|
| 72 |
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
| 73 |
let SEARCH_PATTERN=InnoDB: Defragmentation of CLUST_IND in SYS_INDEXES failed.; |
| 74 |
--source include/search_pattern_in_file.inc |
| 75 |
|
| 76 |
evalp select name, file_size<$fsize shrunk |
| 77 |
from information_schema.innodb_sys_tablespaces where space=0; |
| 78 |
|
| 79 |
let $restart_parameters=; |
| 80 |
--source include/restart_mysqld.inc |
| 81 |
|
| 82 |
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
| 83 |
let SEARCH_PATTERN= InnoDB: Moving the data from extents 4096 through 8960; |
| 84 |
--source include/search_pattern_in_file.inc |
| 85 |
|
| 86 |
let SEARCH_PATTERN=InnoDB: Defragmentation of system tablespace is successful; |
| 87 |
--source include/search_pattern_in_file.inc |
| 88 |
|
| 89 |
evalp select name, file_size<$fsize shrunk |
| 90 |
from information_schema.innodb_sys_tablespaces where space=0; |
| 91 |
|
| 92 |
--source include/shutdown_mysqld.inc |
| 93 |
--move_file $MYSQLD_DATADIR/ibdata1_copy $MYSQLD_DATADIR/ibdata1 |
| 94 |
--move_file $MYSQLD_DATADIR/ib_logfile0_copy $MYSQLD_DATADIR/ib_logfile0 |
| 95 |
--source include/start_mysqld.inc |