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

closes #5481, remove trx->should_abort

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@48871 c7de825b-a66e-492c-adef-691d508d4ae1
parent 3e323a69
......@@ -3260,10 +3260,6 @@ cleanup:
if (error || loader_error) {
my_errno = error ? error : loader_error;
if (using_loader) {
//
// TODO: (Zardosht), remove trx->should_abort as part of
// #5481
trx->should_abort = true;
share->try_table_lock = true;
}
}
......@@ -5955,25 +5951,12 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) {
DBUG_PRINT("trans", ("commiting non-updating transaction"));
reset_stmt_progress(&trx->stmt_progress);
if (!is_fast_alter_running) {
//
// TODO: (Zardosht), remove trx->should_abort as part of
// #5481
//
if (trx->should_abort) {
abort_txn(trx->stmt);
if (tokudb_debug & TOKUDB_DEBUG_TXN) {
TOKUDB_TRACE("rollback:%p\n", trx->stmt);
}
}
else {
commit_txn(trx->stmt, 0);
if (tokudb_debug & TOKUDB_DEBUG_TXN) {
TOKUDB_TRACE("commit:%p:%d\n", trx->stmt, error);
}
commit_txn(trx->stmt, 0);
if (tokudb_debug & TOKUDB_DEBUG_TXN) {
TOKUDB_TRACE("commit:%p:%d\n", trx->stmt, error);
}
trx->stmt = NULL;
trx->sub_sp_level = NULL;
trx->should_abort = false;
}
}
}
......
......@@ -657,7 +657,6 @@ cleanup:
abort_txn(txn);
trx->stmt = NULL;
trx->sub_sp_level = NULL;
trx->should_abort = false;
if (dropping_indexes) {
restore_drop_indexes(table, alter_info->index_drop_buffer, alter_info->index_drop_count);
}
......
......@@ -569,7 +569,6 @@ ha_tokudb::commit_inplace_alter_table(TABLE *altered_table, Alter_inplace_info *
THD *thd = ha_thd();
tokudb_trx_data *trx = (tokudb_trx_data *) thd_data_get(thd, tokudb_hton->slot);
assert(ctx->alter_txn == trx->stmt);
trx->should_abort = true;
assert(trx->tokudb_lock_count > 0);
// for partitioned tables, we use a single transaction to do all of the partition changes. the tokudb_lock_count
// is a reference count for each of the handlers to the same transaction. obviously, we want to only abort once.
......@@ -578,7 +577,6 @@ ha_tokudb::commit_inplace_alter_table(TABLE *altered_table, Alter_inplace_info *
ctx->alter_txn = NULL;
trx->stmt = NULL;
trx->sub_sp_level = NULL;
trx->should_abort = false;
}
transaction = NULL;
......
......@@ -179,7 +179,6 @@ typedef struct st_tokudb_trx_data {
uint tokudb_lock_count;
tokudb_stmt_progress stmt_progress;
bool checkpoint_lock_taken;
bool should_abort;
} tokudb_trx_data;
extern char *tokudb_data_dir;
......
......@@ -813,7 +813,6 @@ static int tokudb_commit(handlerton * hton, THD * thd, bool all) {
}
*txn = 0;
trx->sub_sp_level = NULL;
trx->should_abort = false;
}
else if (tokudb_debug & TOKUDB_DEBUG_TXN) {
TOKUDB_TRACE("nothing to commit %d\n", all);
......@@ -837,7 +836,6 @@ static int tokudb_rollback(handlerton * hton, THD * thd, bool all) {
}
*txn = 0;
trx->sub_sp_level = NULL;
trx->should_abort = false;
}
else {
if (tokudb_debug & TOKUDB_DEBUG_TXN) {
......
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