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:
@ -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()
|
||||
{
|
||||
|
Reference in New Issue
Block a user