Commit a631ac87 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

fix the dump restore crash. close #474

git-svn-id: file:///svn/mysql/tokudb-engine/src@2590 c7de825b-a66e-492c-adef-691d508d4ae1
parent bf82bd17
......@@ -450,6 +450,8 @@ static int tokudb_commit(handlerton * hton, THD * thd, bool all) {
tokudb_trx_data *trx = (tokudb_trx_data *) thd->ha_data[hton->slot];
DB_TXN **txn = all ? &trx->all : &trx->stmt;
int error = (*txn)->commit(*txn, 0);
if (*txn == trx->sp_level)
trx->sp_level = 0;
*txn = 0;
DBUG_RETURN(error);
}
......@@ -460,6 +462,8 @@ static int tokudb_rollback(handlerton * hton, THD * thd, bool all) {
tokudb_trx_data *trx = (tokudb_trx_data *) thd->ha_data[hton->slot];
DB_TXN **txn = all ? &trx->all : &trx->stmt;
int error = (*txn)->abort(*txn);
if (*txn == trx->sp_level)
trx->sp_level = 0;
*txn = 0;
DBUG_RETURN(error);
}
......@@ -1976,7 +1980,8 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) {
DBUG_PRINT("trans", ("commiting non-updating transaction"));
error = trx->stmt->commit(trx->stmt, 0);
trx->stmt = transaction = 0;
} }
}
}
}
DBUG_RETURN(error);
}
......
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