diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-05-11 13:12:18 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-05-11 13:15:10 +0200 |
commit | c9717dc0190731c656cce31fa6e39a3db123e3af (patch) | |
tree | 3db056a3f50e565294d127edb5339afb0a994749 /sql/sql_admin.cc | |
parent | 33721d91389759a917463a044fbd6f0b7654d629 (diff) | |
parent | 1d411a8a440922f0538c1be254d6f4396af453a1 (diff) | |
download | mariadb-git-c9717dc0190731c656cce31fa6e39a3db123e3af.tar.gz |
Merge branch '10.2' into 10.3
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 8c11886998e..f2523b44317 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -1175,7 +1175,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); @@ -1209,7 +1211,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; |