1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

fix race in the MDEV-32614 test

Sometimes 'continue' signal could be missed.
This commit is contained in:
Nikita Malyavin
2024-03-05 02:48:14 +01:00
parent c436b6a2bc
commit 5669cb7323
2 changed files with 10 additions and 15 deletions

View File

@ -1813,20 +1813,18 @@ insert into t select seq, seq from seq_1_to_5;
backup stage start; backup stage start;
connect con_lock,localhost,root,,; connect con_lock,localhost,root,,;
set lock_wait_timeout= 1; set lock_wait_timeout= 1;
set debug_sync='copy_data_between_tables_before_reset_backup_lock wait_for continue'; set debug_sync='copy_data_between_tables_before_reset_backup_lock signal backup wait_for continue';
alter table t add index (b), algorithm=copy, lock=none; alter table t add index (b), algorithm=copy, lock=none;
connection default; connection default;
set debug_sync='now wait_for backup';
backup stage block_commit; backup stage block_commit;
set debug_sync='now signal continue'; set debug_sync='now signal continue';
connection con_lock; connection con_lock;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction ERROR HY000: Lock wait timeout exceeded; try restarting transaction
set debug_sync='copy_data_between_tables_before_reset_backup_lock wait_for continue'; disconnect con_lock;
alter table t add index (a), algorithm=copy, lock=none;
connection default; connection default;
backup stage end; backup stage end;
set debug_sync='now signal continue'; alter table t add index (a), algorithm=copy, lock=none;
connection con_lock;
disconnect con_lock;
connection default; connection default;
drop table t; drop table t;
set global default_storage_engine= MyISAM; set global default_storage_engine= MyISAM;

View File

@ -2074,10 +2074,13 @@ backup stage start;
--connect (con_lock,localhost,root,,) --connect (con_lock,localhost,root,,)
set lock_wait_timeout= 1; set lock_wait_timeout= 1;
set debug_sync='copy_data_between_tables_before_reset_backup_lock wait_for continue'; set debug_sync='copy_data_between_tables_before_reset_backup_lock signal backup wait_for continue';
send alter table t add index (b), algorithm=copy, lock=none; send alter table t add index (b), algorithm=copy, lock=none;
--connection default --connection default
set debug_sync='now wait_for backup';
backup stage block_commit; backup stage block_commit;
set debug_sync='now signal continue'; set debug_sync='now signal continue';
@ -2085,18 +2088,12 @@ set debug_sync='now signal continue';
--connection con_lock --connection con_lock
--error ER_LOCK_WAIT_TIMEOUT --error ER_LOCK_WAIT_TIMEOUT
--reap --reap
# --echo # error $mysql_errno --disconnect con_lock
set debug_sync='copy_data_between_tables_before_reset_backup_lock wait_for continue';
send alter table t add index (a), algorithm=copy, lock=none;
--connection default --connection default
backup stage end; backup stage end;
set debug_sync='now signal continue'; alter table t add index (a), algorithm=copy, lock=none;
--connection con_lock
--reap
--disconnect con_lock
--connection default --connection default
drop table t; drop table t;