summaryrefslogtreecommitdiff
path: root/sql/sql_reload.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2019-11-01 19:18:47 +0400
committerSergey Vojtovich <svoj@mariadb.org>2020-02-13 01:27:14 +0400
commitc5e00fea102f0f8d614f60f39737b55dd09b4062 (patch)
tree51ec14aaffb7f0a31b279edb19d8f06b2e81508d /sql/sql_reload.cc
parent646d1ec83a57d9a5b380079afc3612c1d9acadd5 (diff)
downloadmariadb-git-c5e00fea102f0f8d614f60f39737b55dd09b4062.tar.gz
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.
Diffstat (limited to 'sql/sql_reload.cc')
-rw-r--r--sql/sql_reload.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc
index 0e166b169aa..0898bea6d41 100644
--- a/sql/sql_reload.cc
+++ b/sql/sql_reload.cc
@@ -525,6 +525,12 @@ bool flush_tables_with_read_lock(THD *thd, TABLE_LIST *all_tables)
goto error;
}
+ if (thd->current_backup_stage != BACKUP_FINISHED)
+ {
+ my_error(ER_BACKUP_LOCK_IS_ACTIVE, MYF(0));
+ return true;
+ }
+
if (thd->lex->type & REFRESH_READ_LOCK)
{
/*