mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
4a1ded61a4
- InnoDB fails to shrink the system tablespace when it contains the leaked undo log pages caused by MDEV-30671. - InnoDB does free the unused segment in system tablespace before shrinking the tablespace. InnoDB fails to free the unused segment if XA PREPARE transaction exist or if the previous shutdown was not with innodb_fast_shutdown=0 inode_info: Structure to store the inode page and offsets. fil_space_t::garbage_collect(): Frees the system tablespace unused segment fsp_get_sys_used_segment(): Iterates through all default file segment and index segment present in system tablespace. trx_sys_t::is_xa_exist(): Returns true if the XA transaction exist in the undo logs fseg_inode_free(): Frees the extents, fragment pages for the given index node and ignores any error similar to trx_purge_free_segment() trx_sys_t::reset_page(): Retain the TRX_SYS_FSEG_HEADER value in trx_sys page while resetting the page.
56 lines
2.7 KiB
Text
56 lines
2.7 KiB
Text
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_LIMIT_OPTIMISTIC_INSERT_DEBUG=2;
|
|
SET GLOBAL INNODB_FILE_PER_TABLE= 0;
|
|
Warnings:
|
|
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
|
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;
|
|
InnoDB 0 transactions not purged
|
|
SELECT NAME, FILE_SIZE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES WHERE SPACE = 0;
|
|
NAME FILE_SIZE
|
|
innodb_system 540016640
|
|
# restart: --debug_dbug=+d,traversal_extent_fail
|
|
FOUND 1 /\[Warning\] InnoDB: Cannot shrink the system tablespace/ in mysqld.1.err
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
|
|
# restart: --debug_dbug=+d,shrink_buffer_pool_full
|
|
FOUND 2 /\[Warning\] InnoDB: Cannot shrink the system tablespace/ in mysqld.1.err
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
|
|
# restart: --debug_dbug=+d,mtr_log_max_size
|
|
FOUND 1 /\[ERROR\] InnoDB: Cannot shrink the system tablespace/ in mysqld.1.err
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
|
|
# restart: --debug_dbug=+d,crash_after_sys_truncate
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
# restart: --innodb_buffer_pool_size=5M
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
|
|
SELECT NAME, FILE_SIZE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES WHERE SPACE=0;
|
|
NAME FILE_SIZE
|
|
innodb_system 3145728
|