diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-10-14 11:02:37 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-10-14 11:02:37 +0200 |
commit | 7774a0048a78dc4c5e9a641ef5547aac270f697f (patch) | |
tree | 6e3d5fef8230fe4b1ff38f063f3982eeaa4f8df9 | |
parent | 4eb324693f904ae5cefbeab7152ec11da147088a (diff) | |
download | mariadb-git-7774a0048a78dc4c5e9a641ef5547aac270f697f.tar.gz |
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.
-rw-r--r-- | sql/sql_base.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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); |