diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-11-17 13:40:21 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-11-17 13:40:21 +0200 |
commit | 878f7e38c74baffd1baea00800a6cae0c6c64279 (patch) | |
tree | 6a2052e258a140d4d377e5261a581fde75ffb714 | |
parent | d270525dfde86bcb92a2327234a0954083e14a94 (diff) | |
download | mariadb-git-878f7e38c74baffd1baea00800a6cae0c6c64279.tar.gz |
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.
-rw-r--r-- | mysql-test/suite/innodb/r/instant_alter_debug.result | 5 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/instant_alter_debug.test | 7 |
2 files changed, 6 insertions, 6 deletions
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; diff --git a/mysql-test/suite/innodb/t/instant_alter_debug.test b/mysql-test/suite/innodb/t/instant_alter_debug.test index 8cf2610bbfb..f960affc372 100644 --- a/mysql-test/suite/innodb/t/instant_alter_debug.test +++ b/mysql-test/suite/innodb/t/instant_alter_debug.test @@ -237,11 +237,11 @@ connection ddl; SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged'; send 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'; let $wait_all_purged = 1; --source include/wait_all_purged.inc let $wait_all_purged = 0; @@ -266,10 +266,9 @@ connection ddl; SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged'; send 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; let $wait_all_purged = 1; --source include/wait_all_purged.inc let $wait_all_purged = 0; |