1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
Marko Mäkelä
2021-11-17 13:40:21 +02:00
parent d270525dfd
commit 878f7e38c7
2 changed files with 7 additions and 7 deletions

View File

@ -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 stop_purge;
COMMIT;
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR copied';
connection stop_purge;
COMMIT;
connection default;
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;