summaryrefslogtreecommitdiff
path: root/sql/sql_insert.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_insert.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_insert.cc')
-rw-r--r--sql/sql_insert.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index c741400b741..df896c14a00 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -547,7 +547,7 @@ bool open_and_lock_for_insert_delayed(THD *thd, TABLE_LIST *table_list)
If this goes ok, the tickets are cloned and added to the list of granted
locks held by the handler thread.
*/
- if (thd->global_read_lock.can_acquire_protection())
+ if (thd->has_read_only_protection())
DBUG_RETURN(TRUE);
protection_request.init(MDL_key::BACKUP, "", "", MDL_BACKUP_DML,