From 878f7e38c74baffd1baea00800a6cae0c6c64279 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 17 Nov 2021 13:40:21 +0200 Subject: MDEV-23805 fixup: Adjsut the MDEV-16131 and MDEV-24730 tests MDEV-23805 simplified the treatment of empty tables during ALTER TABLE, which could prevent the scenarios that were previously reported and fixed as MDEV-16131 and MDEV-24730. With the MDEV-23805 fix, the statement SET DEBUG_SYNC = 'now WAIT_FOR copied'; could occasionally time out, depending on timing. Apparently, there was a race condition where purge could resume (and empty the table) before ALTER TABLE got the chance to execute. We must prevent the purge of history from running before ALTER TABLE has started executing. --- mysql-test/suite/innodb/r/instant_alter_debug.result | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mysql-test/suite/innodb/r/instant_alter_debug.result') diff --git a/mysql-test/suite/innodb/r/instant_alter_debug.result b/mysql-test/suite/innodb/r/instant_alter_debug.result index 26db222ca82..11acb2734e7 100644 --- a/mysql-test/suite/innodb/r/instant_alter_debug.result +++ b/mysql-test/suite/innodb/r/instant_alter_debug.result @@ -207,10 +207,11 @@ DELETE FROM t1; connection ddl; SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged'; ALTER TABLE t1 FORCE; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR copied'; connection stop_purge; COMMIT; connection default; -SET DEBUG_SYNC = 'now WAIT_FOR copied'; InnoDB 1 transactions not purged INSERT INTO t1 SET a=1; INSERT INTO t1 SET a=2,b=3,c=4; @@ -230,9 +231,9 @@ DELETE FROM t1; connection ddl; SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged'; ALTER TABLE t1 ADD COLUMN b INT NOT NULL DEFAULT 2 AFTER a, FORCE; -disconnect stop_purge; connection default; SET DEBUG_SYNC = 'now WAIT_FOR copied'; +disconnect stop_purge; InnoDB 1 transactions not purged INSERT INTO t1 SET a=1; INSERT INTO t1 SET a=2,c=4; -- cgit v1.2.1