mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +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:
@ -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;
|
||||
|
Reference in New Issue
Block a user