summaryrefslogtreecommitdiff
path: root/sql/sql_reload.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-11-13 01:34:37 +0200
committerMonty <monty@mariadb.org>2018-12-09 22:12:27 +0200
commitc53aab974bef7d98810409029d996e89677d2f68 (patch)
tree5ea7b1ed09f9b85802d8093e38b9193812cb4a87 /sql/sql_reload.cc
parent965311ee8b2bf65e772a121a83fc35b4dd44de5e (diff)
downloadmariadb-git-c53aab974bef7d98810409029d996e89677d2f68.tar.gz
Added syntax and implementation for BACKUP STAGE's
Part of MDEV-5336 Implement LOCK FOR BACKUP - Changed check of Global_only_lock to also include BACKUP lock. - We store latest MDL_BACKUP_DDL lock in thd->mdl_backup_ticket to be able to downgrade lock during copy_data_between_tables()
Diffstat (limited to 'sql/sql_reload.cc')
-rw-r--r--sql/sql_reload.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc
index 334e1697abd..48c5e9552e5 100644
--- a/sql/sql_reload.cc
+++ b/sql/sql_reload.cc
@@ -221,7 +221,9 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
!thd->mdl_context.has_locks() ||
thd->handler_tables_hash.records ||
thd->ull_hash.records ||
- thd->global_read_lock.is_acquired());
+ thd->global_read_lock.is_acquired() ||
+ thd->current_backup_stage != BACKUP_FINISHED
+ );
/*
Note that if REFRESH_READ_LOCK bit is set then REFRESH_TABLES is set too
@@ -243,6 +245,7 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0));
return 1;
}
+
/*
Writing to the binlog could cause deadlocks, as we don't log
UNLOCK TABLES