From 7774a0048a78dc4c5e9a641ef5547aac270f697f Mon Sep 17 00:00:00 2001 From: Jon Olav Hauglid Date: Thu, 14 Oct 2010 11:02:37 +0200 Subject: [PATCH] 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. --- sql/sql_base.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 8090d8a9288..fe7ec83b845 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -5320,7 +5320,8 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type, end: if (table == NULL) { - trans_rollback_stmt(thd); + if (!thd->in_sub_stmt) + trans_rollback_stmt(thd); close_thread_tables(thd); } thd_proc_info(thd, 0);