diff options
| author | Sergei Golubchik <sergii@pisem.net> | 2013-12-16 13:02:21 +0100 |
|---|---|---|
| committer | Sergei Golubchik <sergii@pisem.net> | 2013-12-16 13:02:21 +0100 |
| commit | d28d3ba40dc8ebef87199a2567ec96e9c5d744e2 (patch) | |
| tree | c6b9ab1d8193fa2a26c5e376d43e536abd3a47ce /sql/sql_admin.cc | |
| parent | ff485d2dc4d5adaf5eef0ccd03ce62adf3bd30b3 (diff) | |
| parent | 6bf10fac445d73fb796d4863612c87bff5f28b66 (diff) | |
| download | mariadb-git-d28d3ba40dc8ebef87199a2567ec96e9c5d744e2.tar.gz | |
10.0-base merge
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 a63457159db..a297e18ab47 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(); |
