Commit 62bd131d authored by Jan Lindström's avatar Jan Lindström

MDEV-4235: Galera: Assertion `0' fails in tdc_remove_table on creating a trigger

Analysis: There is two different THD's using the same table.

Fix: In galera brute force (BF) exclusive locks are cancelled. Thus other threads
could access the same table. Added additional check if this is the case, then we
should not assert here.
parent 21bb5cdf
......@@ -9457,10 +9457,22 @@ void tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
{
I_P_List_iterator<TABLE, TABLE_share> it2(share->used_tables);
while ((table= it2++))
if (table->in_use != thd)
{
DBUG_ASSERT(0);
}
#ifdef WITH_WSREP
/* if thd was BF aborted, exclusive locks were canceled,
thus others can use table */
if (table->in_use != thd &&
table->in_use->wsrep_bf_thd != thd &&
table->in_use->wsrep_conflict_state != MUST_ABORT)
{
#endif
if (table->in_use != thd)
{
DBUG_ASSERT(0);
}
#ifdef WITH_WSREP
}
#endif
}
#endif
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment