mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-4897 - Assertion `share->tdc.prev == 0 && share->tdc.next == 0'
failed in TABLE_SHARE* tdc_acquire_share(THD*, const char*, const char*, const char*, uint, uint, TABLE**) Removed false assertions. When multiple threads acquire the same previously unused share, only one thread shall remove share from unused list (the one that has was_unused == true). Other threads will ignore this step and may continue even if share is not yet removed from unused list.
This commit is contained in:
@ -847,7 +847,6 @@ TABLE_SHARE *tdc_acquire_share(THD *thd, const char *db, const char *table_name,
|
|||||||
if ((*out_table= tc_acquire_table(thd, share)))
|
if ((*out_table= tc_acquire_table(thd, share)))
|
||||||
{
|
{
|
||||||
DBUG_ASSERT(!(flags & GTS_NOLOCK));
|
DBUG_ASSERT(!(flags & GTS_NOLOCK));
|
||||||
DBUG_ASSERT(!share->tdc.prev && !share->tdc.next);
|
|
||||||
DBUG_ASSERT(!share->error);
|
DBUG_ASSERT(!share->error);
|
||||||
DBUG_ASSERT(!share->is_view);
|
DBUG_ASSERT(!share->is_view);
|
||||||
DBUG_RETURN(share);
|
DBUG_RETURN(share);
|
||||||
@ -898,7 +897,6 @@ TABLE_SHARE *tdc_acquire_share(THD *thd, const char *db, const char *table_name,
|
|||||||
}
|
}
|
||||||
mysql_mutex_unlock(&LOCK_unused_shares);
|
mysql_mutex_unlock(&LOCK_unused_shares);
|
||||||
}
|
}
|
||||||
DBUG_ASSERT(share->tdc.prev == 0 && share->tdc.next == 0);
|
|
||||||
|
|
||||||
end:
|
end:
|
||||||
DBUG_PRINT("exit", ("share: 0x%lx ref_count: %u",
|
DBUG_PRINT("exit", ("share: 0x%lx ref_count: %u",
|
||||||
|
Reference in New Issue
Block a user