summaryrefslogtreecommitdiff
path: root/sql/wsrep_hton.cc
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@skysql.com>2014-04-09 13:50:06 -0400
committerNirbhay Choubey <nirbhay@skysql.com>2014-04-09 13:50:06 -0400
commit3afc4131124160a3f1b9911162370b658a45ca51 (patch)
treefb5a2bb651502bf83eb223826fc9df25af6ebf16 /sql/wsrep_hton.cc
parentba7f73f067b3605ad265c541d71388d6909e40ef (diff)
parent9d911608f15005be48dad55440e87a6982067233 (diff)
downloadmariadb-git-3afc4131124160a3f1b9911162370b658a45ca51.tar.gz
Local merge (mariadb-galera-10.0.10).
Diffstat (limited to 'sql/wsrep_hton.cc')
-rw-r--r--sql/wsrep_hton.cc19
1 files changed, 6 insertions, 13 deletions
diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc
index f26501775e2..6319ce561e1 100644
--- a/sql/wsrep_hton.cc
+++ b/sql/wsrep_hton.cc
@@ -135,7 +135,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
*/
@@ -156,14 +156,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);
}
@@ -331,7 +324,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);
@@ -382,7 +375,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;
@@ -395,7 +388,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);
}
}
@@ -518,7 +511,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");