1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-20867 - Perform careful review of "Server crashes with BACKUP STAGE and FLUSH TABLE table_name"

Reverted original patch (c2e0a0b).

For consistency with "LOCK TABLE <table_name> READ" and "FLUSH TABLES
WITH READ LOCK", which are forbidden under "BACKUP STAGE", forbid "FLUSH
TABLE <table_name> FOR EXPORT" and "FLUSH TABLE <table_name> WITH READ
LOCK" as well.

It'd allow consistent fixes for problems like MDEV-18643.
This commit is contained in:
Sergey Vojtovich
2019-11-01 19:18:47 +04:00
parent 646d1ec83a
commit c5e00fea10
5 changed files with 16 additions and 53 deletions

View File

@ -509,30 +509,9 @@ BACKUP STAGE END;
CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY, f INT);
BACKUP STAGE START;
--error ER_BACKUP_LOCK_IS_ACTIVE
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;
--error ER_BACKUP_LOCK_IS_ACTIVE
FLUSH TABLE t1 WITH READ LOCK;
BACKUP STAGE END;
DROP TABLE t1;