Follow-up for Bug #55930 Assertion `thd->transaction.stmt.is_empty()

|| thd->in_sub_stmt || (thd->state..

Don't rollback statement transactions if we are in a sub-statement.
This could for example happen for open_ltable() when opening the
general log during execution of a stored procedure.
This commit is contained in:
Jon Olav Hauglid 2010-10-14 11:02:37 +02:00
parent 4eb324693f
commit 7774a0048a

View file

@ -5320,6 +5320,7 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type,
end:
if (table == NULL)
{
if (!thd->in_sub_stmt)
trans_rollback_stmt(thd);
close_thread_tables(thd);
}