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/handler.cc | |
parent | ff485d2dc4d5adaf5eef0ccd03ce62adf3bd30b3 (diff) | |
parent | 6bf10fac445d73fb796d4863612c87bff5f28b66 (diff) | |
download | mariadb-git-d28d3ba40dc8ebef87199a2567ec96e9c5d744e2.tar.gz |
10.0-base merge
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 075855bde16..ae337f4a153 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1587,10 +1587,16 @@ int ha_rollback_trans(THD *thd, bool all) } trans->ha_list= 0; trans->no_2pc=0; - if (is_real_trans && thd->transaction_rollback_request && - thd->transaction.xid_state.xa_state != XA_NOTR) - thd->transaction.xid_state.rm_error= thd->get_stmt_da()->sql_errno(); } + + /* + Thanks to possibility of MDL deadlock rollback request can come even if + transaction hasn't been started in any transactional storage engine. + */ + if (is_real_trans && thd->transaction_rollback_request && + thd->transaction.xid_state.xa_state != XA_NOTR) + thd->transaction.xid_state.rm_error= thd->get_stmt_da()->sql_errno(); + /* Always cleanup. Even if nht==0. There may be savepoints. */ if (is_real_trans) { |