mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Server crashes with BACKUP STAGE and FLUSH TABLE table_name
Fixes MDEV-18067, MDEV-18068 and MDEV-18069 The problem was that FLUSH TABLES table_name combined with UNLOCK TABLES calls MDL_context::set_transaction_duration_for_all_locks(), which changed backup_locks from MDL_EXPLICT to MDL_TRANSACTION. Fixed by ensuring that set_transaction_duration_for_all_locks() doesn't touch BACKUP locks.
This commit is contained in:
@ -501,3 +501,38 @@ TRUNCATE t_temporary_innodb;
|
||||
ALTER TABLE t_temporary_innodb ADD COLUMN col2 INT;
|
||||
ALTER TABLE t_temporary_innodb ADD KEY idx(col2);
|
||||
BACKUP STAGE END;
|
||||
|
||||
#
|
||||
# MDEV-18067, MDEV-18068 and MDEV-18069
|
||||
# Server crashes with BACKUP STAGE and FLUSH TABLE table_name
|
||||
#
|
||||
|
||||
CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY, f INT);
|
||||
BACKUP STAGE START;
|
||||
FLUSH TABLE t1 FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
BACKUP STAGE END;
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
BACKUP STAGE START;
|
||||
FLUSH TABLE t1 FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
--connect (con1,localhost,root,,test)
|
||||
--send BACKUP STAGE START
|
||||
--connection default
|
||||
BACKUP STAGE END;
|
||||
--connection con1
|
||||
reap;
|
||||
BACKUP STAGE END;
|
||||
--disconnect con1
|
||||
--connection default
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
BACKUP STAGE START;
|
||||
FLUSH TABLES t1 WITH READ LOCK;
|
||||
UNLOCK TABLES;
|
||||
BACKUP STAGE BLOCK_COMMIT;
|
||||
BACKUP STAGE END;
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user