diff options
author | Nirbhay Choubey <nirbhay@skysql.com> | 2014-02-28 13:56:08 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@skysql.com> | 2014-02-28 13:56:08 -0500 |
commit | c3a2394641e2f7b199977bcf699ad64c1bb1367f (patch) | |
tree | f8867141b6f645065820a14eb74562778ca8d0e4 /sql/wsrep_hton.cc | |
parent | ae6e1548cbda6cb1509f84edb57786c9520a7a6e (diff) | |
download | mariadb-git-c3a2394641e2f7b199977bcf699ad64c1bb1367f.tar.gz |
* Merged revisions 3945, 3946..3950, 3951..3961
from codership-mysql/5.5.
* Merged changes in innobase to xtradb.
* Updated WSREP_PATCH_REVNO.
Diffstat (limited to 'sql/wsrep_hton.cc')
-rw-r--r-- | sql/wsrep_hton.cc | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index be60d997265..c5627ff97fb 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -139,7 +139,7 @@ wsrep_close_connection(handlerton* hton, THD* thd) - certification test or an equivalent. As a result, the current transaction just rolls back Error codes: - WSREP_TRX_ROLLBACK, WSREP_TRX_ERROR + WSREP_TRX_CERT_FAIL, WSREP_TRX_SIZE_EXCEEDED, WSREP_TRX_ERROR - a post-certification failure makes this server unable to commit its own WS and therefore the server must abort */ @@ -160,14 +160,7 @@ static int wsrep_prepare(handlerton *hton, THD *thd, bool all) !thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) && (thd->variables.wsrep_on && !wsrep_trans_cache_is_empty(thd))) { - switch (wsrep_run_wsrep_commit(thd, hton, all)) - { - case WSREP_TRX_OK: - break; - case WSREP_TRX_ROLLBACK: - case WSREP_TRX_ERROR: - DBUG_RETURN(1); - } + DBUG_RETURN (wsrep_run_wsrep_commit(thd, hton, all)); } DBUG_RETURN(0); } @@ -324,7 +317,7 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all) WSREP_INFO("innobase_commit, abort %s", (thd->query()) ? thd->query() : "void"); } - DBUG_RETURN(WSREP_TRX_ROLLBACK); + DBUG_RETURN(WSREP_TRX_CERT_FAIL); } mysql_mutex_lock(&LOCK_wsrep_replaying); @@ -375,7 +368,7 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all) mysql_mutex_unlock(&thd->LOCK_wsrep_thd); WSREP_DEBUG("innobase_commit abort after replaying wait %s", (thd->query()) ? thd->query() : "void"); - DBUG_RETURN(WSREP_TRX_ROLLBACK); + DBUG_RETURN(WSREP_TRX_CERT_FAIL); } thd->wsrep_query_state = QUERY_COMMITTING; @@ -388,7 +381,7 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all) rcode = wsrep_write_cache(wsrep, thd, cache, &data_len); if (WSREP_OK != rcode) { WSREP_ERROR("rbr write fail, data_len: %zu, %d", data_len, rcode); - DBUG_RETURN(WSREP_TRX_ROLLBACK); + DBUG_RETURN(WSREP_TRX_SIZE_EXCEEDED); } } @@ -510,7 +503,7 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all) } mysql_mutex_unlock(&thd->LOCK_wsrep_thd); - DBUG_RETURN(WSREP_TRX_ROLLBACK); + DBUG_RETURN(WSREP_TRX_CERT_FAIL); case WSREP_CONN_FAIL: WSREP_ERROR("connection failure"); |