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

Combine GLOBAL and COMMIT namespaces into BACKUP namespace.

Part of MDEV-5336 Implement LOCK FOR BACKUP

Other things:
- Added printing of MDL locks to DBUG.
This commit is contained in:
Sergey Vojtovich
2018-10-30 00:09:02 +04:00
committed by Monty
parent 7fb9d64989
commit 7a9dfdd8d9
28 changed files with 377 additions and 245 deletions

View File

@ -550,7 +550,7 @@ bool open_and_lock_for_insert_delayed(THD *thd, TABLE_LIST *table_list)
if (thd->global_read_lock.can_acquire_protection())
DBUG_RETURN(TRUE);
protection_request.init(MDL_key::GLOBAL, "", "", MDL_INTENTION_EXCLUSIVE,
protection_request.init(MDL_key::BACKUP, "", "", MDL_BACKUP_STMT,
MDL_STATEMENT);
if (thd->mdl_context.acquire_lock(&protection_request,
@ -2375,8 +2375,8 @@ bool delayed_get_table(THD *thd, MDL_request *grl_protection_request,
di->table_list.alias.length= di->table_list.table_name.length= di->thd.query_length();
di->table_list.db= di->thd.db;
/* We need the tickets so that they can be cloned in handle_delayed_insert */
di->grl_protection.init(MDL_key::GLOBAL, "", "",
MDL_INTENTION_EXCLUSIVE, MDL_STATEMENT);
di->grl_protection.init(MDL_key::BACKUP, "", "",
MDL_BACKUP_STMT, MDL_STATEMENT);
di->grl_protection.ticket= grl_protection_request->ticket;
init_mdl_requests(&di->table_list);
di->table_list.mdl_request.ticket= table_list->mdl_request.ticket;