2018-11-22 10:41:15 +02:00
|
|
|
--source include/have_innodb.inc
|
2018-11-23 18:36:44 +02:00
|
|
|
--source include/maybe_debug.inc
|
|
|
|
if ($have_debug) {
|
|
|
|
--source include/have_debug_sync.inc
|
|
|
|
}
|
2018-11-22 10:41:15 +02:00
|
|
|
|
2023-06-08 09:17:52 +03:00
|
|
|
--source include/wait_all_purged.inc
|
2018-11-22 10:41:15 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # MDEV-17793 Crash in purge after instant DROP and emptying the table
|
|
|
|
--echo #
|
|
|
|
|
|
|
|
connect (prevent_purge,localhost,root);
|
|
|
|
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
|
|
|
|
|
|
|
connection default;
|
2023-11-21 12:42:00 +02:00
|
|
|
CREATE TABLE t1 (f1 INT, f2 INT) ENGINE=InnoDB STATS_PERSISTENT=0;
|
2018-11-22 10:41:15 +02:00
|
|
|
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;
|
2023-06-08 09:17:52 +03:00
|
|
|
SET GLOBAL innodb_max_purge_lag_wait=1;
|
2018-11-22 10:41:15 +02:00
|
|
|
ALTER TABLE t1 DROP extra;
|
|
|
|
disconnect prevent_purge;
|
|
|
|
let $wait_all_purged= 0;
|
|
|
|
--source include/wait_all_purged.inc
|
|
|
|
DROP TABLE t1;
|