diff options
| author | Jan Lindström <jplindst@mariadb.org> | 2014-01-25 11:02:49 +0200 |
|---|---|---|
| committer | Jan Lindström <jplindst@mariadb.org> | 2014-01-25 11:02:49 +0200 |
| commit | d43afb8828e358f9c3bb690d0fdcd88b0637f155 (patch) | |
| tree | f977f3b5fa3c938183510750aecbea31bccc67ef /sql/sql_admin.cc | |
| parent | d0f77b83611077344ff29db02ea5593c9da62537 (diff) | |
| parent | 02765f4c614069ece1f30976848b6299ba6f24bd (diff) | |
| download | mariadb-git-d43afb8828e358f9c3bb690d0fdcd88b0637f155.tar.gz | |
Merge MariaDB-10.0.7 revision 3961.
Diffstat (limited to 'sql/sql_admin.cc')
| -rw-r--r-- | sql/sql_admin.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index 34200d46ea2..3f5ae79299d 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -993,8 +993,20 @@ send_result_message: } } /* Error path, a admin command failed. */ - trans_commit_stmt(thd); - trans_commit_implicit(thd); + if (thd->transaction_rollback_request) + { + /* + Unlikely, but transaction rollback was requested by one of storage + engines (e.g. due to deadlock). Perform it. + */ + if (trans_rollback_stmt(thd) || trans_rollback_implicit(thd)) + goto err; + } + else + { + if (trans_commit_stmt(thd) || trans_commit_implicit(thd)) + goto err; + } close_thread_tables(thd); thd->mdl_context.release_transactional_locks(); |
