Commit 7774a004 authored by Jon Olav Hauglid's avatar Jon Olav Hauglid

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.
parent 4eb32469
...@@ -5320,6 +5320,7 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type, ...@@ -5320,6 +5320,7 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type,
end: end:
if (table == NULL) if (table == NULL)
{ {
if (!thd->in_sub_stmt)
trans_rollback_stmt(thd); trans_rollback_stmt(thd);
close_thread_tables(thd); close_thread_tables(thd);
} }
......
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