From c53aab974bef7d98810409029d996e89677d2f68 Mon Sep 17 00:00:00 2001 From: Monty Date: Tue, 13 Nov 2018 01:34:37 +0200 Subject: 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() --- sql/sql_insert.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_insert.cc') 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, -- cgit v1.2.1