1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-14685 Assertion `!fully || (bool) hist_part' failed in Vers_part_info::initialized

This commit is contained in:
Aleksey Midenkov
2017-12-20 21:04:22 +03:00
parent 4bc268d406
commit 6e530d4df5
2 changed files with 25 additions and 0 deletions

View File

@ -16,8 +16,21 @@ public:
thd(_thd), table(_table)
{
DBUG_ASSERT(thd);
MDL_request protection_request;
if (thd->global_read_lock.can_acquire_protection())
{
error= true;
return;
}
protection_request.init(MDL_key::GLOBAL, "", "", MDL_INTENTION_EXCLUSIVE,
MDL_EXPLICIT);
error= thd->mdl_context.acquire_lock(&protection_request, thd->variables.lock_wait_timeout);
if (error)
return;
table.mdl_request.init(MDL_key::TABLE, table.db, table.table_name, MDL_EXCLUSIVE, MDL_EXPLICIT);
error= thd->mdl_context.acquire_lock(&table.mdl_request, thd->variables.lock_wait_timeout);
thd->mdl_context.release_lock(protection_request.ticket);
}
~MDL_auto_lock()
{