diff options
author | Seppo Jaakola <seppo.jaakola@codership.com> | 2013-11-26 22:09:14 +0200 |
---|---|---|
committer | Seppo Jaakola <seppo.jaakola@codership.com> | 2013-11-26 22:09:14 +0200 |
commit | 6422d276fa8d1217aa68be1d90c712efa4d71409 (patch) | |
tree | 67bc00215ac0bea9b6c14e51a0018a9d7f0cd886 /sql/handler.cc | |
parent | 4a11e84414292e852a0968ef871dc90cbd24ae30 (diff) | |
download | mariadb-git-6422d276fa8d1217aa68be1d90c712efa4d71409.tar.gz |
bzr merge -r3895..3903 lp:codership-mysql/5.5
This is just before 5.5.34 merge in wsrep-5.5 branch
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 11ad582a2ff..b060c06150d 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1303,11 +1303,7 @@ int ha_commit_trans(THD *thd, bool all) Free resources and perform other cleanup even for 'empty' transactions. */ if (is_real_trans) -#ifdef WITH_WSREP - thd->transaction.cleanup(thd); -#else thd->transaction.cleanup(); -#endif /* WITH_WSREP */ DBUG_RETURN(0); } @@ -1388,6 +1384,7 @@ int ha_commit_trans(THD *thd, bool all) status_var_increment(thd->status_var.ha_prepare_count); if (err) #ifdef WITH_WSREP + { if (WSREP(thd) && ht->db_type== DB_TYPE_WSREP) { error= 1; @@ -1397,10 +1394,13 @@ int ha_commit_trans(THD *thd, bool all) my_error(ER_LOCK_DEADLOCK, MYF(0), err); } } - else + else /* not wsrep hton, bail to native mysql behavior */ -#endif +#endif /* WITH_WSREP */ my_error(ER_ERROR_DURING_COMMIT, MYF(0), err); +#ifdef WITH_WSREP + } +#endif /* WITH_WSREP */ if (err) goto err; @@ -1535,12 +1535,7 @@ commit_one_phase_2(THD *thd, bool all, THD_TRANS *trans, bool is_real_trans) } /* Free resources and perform other cleanup even for 'empty' transactions. */ if (is_real_trans) -#ifdef WITH_WSREP - thd->transaction.cleanup(thd); -#else - thd->transaction.cleanup(); -#endif /* WITH_WSREP */ - + thd->transaction.cleanup(); DBUG_RETURN(error); } @@ -1614,11 +1609,7 @@ int ha_rollback_trans(THD *thd, bool all) } /* Always cleanup. Even if nht==0. There may be savepoints. */ if (is_real_trans) -#ifdef WITH_WSREP - thd->transaction.cleanup(thd); -#else - thd->transaction.cleanup(); -#endif /* WITH_WSREP */ + thd->transaction.cleanup(); if (all) thd->transaction_rollback_request= FALSE; |