mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MENT-328 Retry BACKUP STAGE BLOCK DDL in case of deadlocks
MENT-328 wrongly assumed that the backup failed because of warnings from mariabackup about not found files. This is normal (and the error message should be deleted). randgen failed because mariabackup didn't retry BACKUP STAGE BLOCK DDL if it failed with a deadlock. To simplify things, I implemented the retry loop in the server as this particular deadlock should be quickly resolved.
This commit is contained in:
@ -39,6 +39,28 @@ MDL_INTENTION_EXCLUSIVE Schema metadata lock test
|
||||
select * from t1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
backup unlock;
|
||||
connection con1;
|
||||
connection default;
|
||||
#
|
||||
# Check that BACKUP LOCK blocks some operations
|
||||
#
|
||||
create sequence seq1;
|
||||
create sequence seq2;
|
||||
backup lock seq1;
|
||||
connection con1;
|
||||
CREATE OR REPLACE SEQUENCE seq1 START -28;
|
||||
ERROR HY000: Sequence 'test.seq1' values are conflicting
|
||||
SET STATEMENT max_statement_time=10 FOR CREATE OR REPLACE SEQUENCE seq1 START 50;
|
||||
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
|
||||
SET STATEMENT max_statement_time=10 FOR ALTER SEQUENCE IF EXISTS seq1 NOMAXVALUE;
|
||||
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
|
||||
SET STATEMENT max_statement_time=10 FOR ALTER SEQUENCE IF EXISTS seq1 MAXVALUE 1000;
|
||||
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
|
||||
SET STATEMENT max_statement_time=10 for rename table seq2 to seq3, seq3 to seq1;
|
||||
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
|
||||
connection default;
|
||||
backup unlock;
|
||||
drop table seq1,seq2;
|
||||
#
|
||||
# BACKUP LOCK and BACKUP UNLOCK are not allowed in procedures.
|
||||
#
|
||||
@ -141,7 +163,6 @@ ERROR HY000: Can't execute the given command because you have active locked tabl
|
||||
SET STATEMENT max_statement_time=180 FOR BACKUP LOCK test.u;
|
||||
# restart
|
||||
#
|
||||
connection con1;
|
||||
connection default;
|
||||
disconnect con1;
|
||||
show tables;
|
||||
|
Reference in New Issue
Block a user