| 1 |
--source include/have_innodb.inc |
| 2 |
--source include/have_sequence.inc |
| 3 |
--source include/have_debug.inc |
| 4 |
|
| 5 |
--let MYSQLD_DATADIR= `SELECT @@datadir` |
| 6 |
--source include/shutdown_mysqld.inc |
| 7 |
--copy_file $MYSQLD_DATADIR/ibdata1 $MYSQLD_DATADIR/ibdata1_copy |
| 8 |
--copy_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile0_copy |
| 9 |
--source include/start_mysqld.inc |
| 10 |
|
| 11 |
SET GLOBAL innodb_file_per_table= 0; |
| 12 |
SET GLOBAL innodb_limit_optimistic_insert_debug = 2; |
| 13 |
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL, f3 INT NOT NULL)ENGINE=InnoDB; |
| 14 |
INSERT INTO t1 SELECT seq, seq, seq FROM seq_1_to_16384; |
| 15 |
SET GLOBAL innodb_file_per_table= default; |
| 16 |
CREATE TABLE t2(f1 INT NOT NULL PRIMARY KEY,f2 VARCHAR(40))ENGINE=InnoDB PARTITION BY KEY() PARTITIONS 256; |
| 17 |
INSERT INTO t1 SELECT seq, seq, seq FROM seq_1_to_16384; |
| 18 |
DROP TABLE t2, t1; |
| 19 |
--source include/wait_all_purged.inc |
| 20 |
|
| 21 |
let $fsize=`select file_size from information_schema.innodb_sys_tablespaces where space = 0`; |
| 22 |
|
| 23 |
set GLOBAL innodb_fast_shutdown= 0; |
| 24 |
--source include/restart_mysqld.inc |
| 25 |
|
| 26 |
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
| 27 |
let SEARCH_PATTERN=InnoDB: Moving the data from extents 4096 through 22016; |
| 28 |
--source include/search_pattern_in_file.inc |
| 29 |
|
| 30 |
let SEARCH_PATTERN=InnoDB: Defragmentation of system tablespace is successful; |
| 31 |
--source include/search_pattern_in_file.inc |
| 32 |
|
| 33 |
evalp select name, file_size<$fsize shrunk |
| 34 |
from information_schema.innodb_sys_tablespaces where space=0; |
| 35 |
|
| 36 |
--source include/shutdown_mysqld.inc |
| 37 |
|
| 38 |
--move_file $MYSQLD_DATADIR/ibdata1_copy $MYSQLD_DATADIR/ibdata1 |
| 39 |
--move_file $MYSQLD_DATADIR/ib_logfile0_copy $MYSQLD_DATADIR/ib_logfile0 |
| 40 |
|
| 41 |
--source include/start_mysqld.inc |