summaryrefslogtreecommitdiff
path: root/sql/sql_admin.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-05-06 22:46:56 +0200
committerSergei Golubchik <serg@mariadb.org>2018-05-08 10:48:13 +0200
commit34045af03f25fc2edd7c0c8db054e505f271513c (patch)
tree25f14d17460cf65238657b1e87afe4fec5fd4d90 /sql/sql_admin.cc
parent087ea8f820f46e200a2f8f84328c078555dda45f (diff)
downloadmariadb-git-34045af03f25fc2edd7c0c8db054e505f271513c.tar.gz
MDEV-15216 Assertion `! is_set() || m_can_overwrite_status' failed in Diagnostics_area::set_error_status upon operation inside XA
don't implicitly commit or rollback in mysql_admin_table() unless the statement has CF_IMPLICIT_COMMIT_END flag.
Diffstat (limited to 'sql/sql_admin.cc')
-rw-r--r--sql/sql_admin.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index 06a453e1bb7..4fe51a2189e 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -1064,7 +1064,9 @@ send_result_message:
}
else
{
- if (trans_commit_stmt(thd) || trans_commit_implicit(thd))
+ if (trans_commit_stmt(thd) ||
+ (stmt_causes_implicit_commit(thd, CF_IMPLICIT_COMMIT_END) &&
+ trans_commit_implicit(thd)))
goto err;
}
close_thread_tables(thd);
@@ -1098,7 +1100,8 @@ send_result_message:
err:
/* Make sure this table instance is not reused after the failure. */
trans_rollback_stmt(thd);
- trans_rollback(thd);
+ if (stmt_causes_implicit_commit(thd, CF_IMPLICIT_COMMIT_END))
+ trans_rollback(thd);
if (table && table->table)
{
table->table->m_needs_reopen= true;