diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-05-08 14:13:01 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-05-08 17:08:23 +0200 |
commit | 1bc3899a52fd32a9d62f0c43eb9da8738204e4a7 (patch) | |
tree | 97c00174d3b7dc5763eabf20655bb53c07e28240 /sql/sql_admin.cc | |
parent | de0e5fe17c9e59fc7e16691b00eb32162a2a1409 (diff) | |
parent | 34045af03f25fc2edd7c0c8db054e505f271513c (diff) | |
download | mariadb-git-1bc3899a52fd32a9d62f0c43eb9da8738204e4a7.tar.gz |
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/sql_admin.cc')
-rw-r--r-- | sql/sql_admin.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index 40bbb0a4f51..ef7a2e82338 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -1113,7 +1113,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); @@ -1147,7 +1149,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; |