mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-32452 InnoDB system tablespace is not shrunk on slow shutdown
- During slow shutdown, shrink the system tablespace which
was done in commit f9003c73a1
(MDEV-14795)
This commit is contained in:
51
mysql-test/suite/innodb/t/sys_truncate_shutdown_debug.test
Normal file
51
mysql-test/suite/innodb/t/sys_truncate_shutdown_debug.test
Normal file
@@ -0,0 +1,51 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_sequence.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_debug.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: Cannot shrink the system tablespace");
|
||||
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
|
||||
|
||||
SET GLOBAL innodb_fast_shutdown=0;
|
||||
--source include/restart_mysqld.inc
|
||||
SET GLOBAL INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=2;
|
||||
SET GLOBAL INNODB_FILE_PER_TABLE= 0;
|
||||
SET UNIQUE_CHECKS=0, FOREIGN_KEY_CHECKS=0;
|
||||
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL,
|
||||
f3 INT NOT NULL, INDEX(f1),
|
||||
INDEX(f2), INDEX(f3))ENGINE=InnoDB;
|
||||
BEGIN;
|
||||
INSERT INTO t1 SELECT seq, seq, seq FROM seq_1_to_16384;
|
||||
INSERT INTO t1 SELECT seq, seq, seq FROM seq_1_to_16384;
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
||||
SELECT NAME, FILE_SIZE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES WHERE SPACE = 0;
|
||||
|
||||
SET GLOBAL INNODB_FAST_SHUTDOWN=0;
|
||||
SET GLOBAL DEBUG_DBUG="+d,shrink_buffer_pool_full";
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--let SEARCH_PATTERN= \\[Warning\\] InnoDB: Cannot shrink the system tablespace
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
SELECT NAME, FILE_SIZE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES WHERE SPACE = 0;
|
||||
|
||||
SET GLOBAL INNODB_FAST_SHUTDOWN=0;
|
||||
SET GLOBAL DEBUG_DBUG="+d,mtr_log_max_size";
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--let SEARCH_PATTERN= \\[ERROR\\] InnoDB: Cannot shrink the system tablespace
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
SELECT NAME, FILE_SIZE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES WHERE SPACE = 0;
|
||||
|
||||
SET GLOBAL INNODB_FAST_SHUTDOWN=0;
|
||||
# Crash after shrinking the system tablespace
|
||||
let $restart_parameters=--debug_dbug="+d,crash_after_sys_truncate";
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
SELECT NAME, FILE_SIZE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES WHERE SPACE = 0;
|
Reference in New Issue
Block a user