Commit ed8d7917 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:4297], add some more test hooks for XA

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@41754 c7de825b-a66e-492c-adef-691d508d4ae1
parent 13d66dcf
......@@ -813,7 +813,11 @@ static int tokudb_commit(handlerton * hton, THD * thd, bool all) {
if (tokudb_debug & TOKUDB_DEBUG_TXN) {
TOKUDB_TRACE("doing txn commit:%d:%p\n", all, *txn);
}
// test hook to induce a crash on a debug build
DBUG_EXECUTE_IF("tokudb_crash_commit_before", DBUG_SUICIDE(););
commit_txn_with_progress(*txn, syncflag, thd);
// test hook to induce a crash on a debug build
DBUG_EXECUTE_IF("tokudb_crash_commit_after", DBUG_SUICIDE(););
if (*txn == trx->sp_level) {
trx->sp_level = 0;
}
......@@ -865,7 +869,11 @@ static int tokudb_xa_prepare(handlerton* hton, THD* thd, bool all) {
// a TOKU_XA_XID is identical to a MYSQL_XID
TOKU_XA_XID thd_xid;
thd_get_xid(thd, (MYSQL_XID*) &thd_xid);
// test hook to induce a crash on a debug build
DBUG_EXECUTE_IF("tokudb_crash_prepare_before", DBUG_SUICIDE(););
r = txn->xa_prepare(txn, &thd_xid);
// test hook to induce a crash on a debug build
DBUG_EXECUTE_IF("tokudb_crash_prepare_after", DBUG_SUICIDE(););
}
else if (tokudb_debug & TOKUDB_DEBUG_TXN) {
TOKUDB_TRACE("nothing to prepare %d\n", all);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment