mirror of
https://github.com/MariaDB/server.git
synced 2025-04-22 07:05:33 +02:00

purge_sys_t::sees(): Wrapper for view.sees(). trx_purge_truncate_history(): Invoke purge_sys.sees() instead of comparing to head.trx_no, to determine if undo pages can be safely freed. The test innodb.cursor-restore-locking was adjusted by Vladislav Lesin, as was the the debug instrumentation in row_purge_del_mark(). Reviewed by: Vladislav Lesin
25 lines
870 B
Text
25 lines
870 B
Text
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
|
|
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
|
|
InnoDB 0 transactions not purged
|
|
#
|
|
# MDEV-17793 Crash in purge after instant DROP and emptying the table
|
|
#
|
|
connect prevent_purge,localhost,root;
|
|
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
|
connection default;
|
|
CREATE TABLE t1 (f1 INT, f2 INT) ENGINE=InnoDB;
|
|
INSERT INTO t1 () VALUES ();
|
|
ALTER TABLE t1 DROP f2, ADD COLUMN f2 INT;
|
|
ALTER TABLE t1 DROP f1;
|
|
DELETE FROM t1;
|
|
connection prevent_purge;
|
|
COMMIT;
|
|
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
|
connection default;
|
|
ALTER TABLE t1 ADD COLUMN extra TINYINT UNSIGNED NOT NULL DEFAULT 42;
|
|
SET GLOBAL innodb_max_purge_lag_wait=1;
|
|
ALTER TABLE t1 DROP extra;
|
|
disconnect prevent_purge;
|
|
InnoDB 0 transactions not purged
|
|
DROP TABLE t1;
|
|
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
|