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

[t:2267], get rid of trx->iso_level, makes life easier

git-svn-id: file:///svn/mysql/tokudb-engine/src@16941 c7de825b-a66e-492c-adef-691d508d4ae1
parent d6a39b21
......@@ -955,7 +955,6 @@ int create_tokudb_trx_data_instance(tokudb_trx_data** out_trx) {
error = ENOMEM;
goto cleanup;
}
trx->iso_level = hatoku_iso_not_set;
*out_trx = trx;
error = 0;
......@@ -4843,10 +4842,6 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
(thd_sql_command(thd) != SQLCOM_ALTER_TABLE)) {
/* QQQ We have to start a master transaction */
DBUG_PRINT("trans", ("starting transaction all: options: 0x%lx", (ulong) thd->options));
//
// set the isolation level for the tranaction
//
trx->iso_level = toku_iso_level;
if ((error = db_env->txn_begin(db_env, NULL, &trx->all, toku_iso_to_txn_flag(toku_iso_level)))) {
trx->tokudb_lock_count--; // We didn't get the lock
goto cleanup;
......@@ -4864,11 +4859,11 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
}
}
u_int32_t txn_begin_flags;
if (trx->iso_level == hatoku_iso_not_set) {
if (trx->all == NULL) {
txn_begin_flags = toku_iso_to_txn_flag(toku_iso_level);
}
else {
txn_begin_flags = toku_iso_to_txn_flag(trx->iso_level);
txn_begin_flags = DB_INHERIT_ISOLATION;
}
if ((error = db_env->txn_begin(db_env, trx->sp_level, &trx->stmt, txn_begin_flags))) {
/* We leave the possible master transaction open */
......
......@@ -97,7 +97,6 @@ typedef struct st_tokudb_trx_data {
DB_TXN *stmt;
DB_TXN *sp_level;
uint tokudb_lock_count;
HA_TOKU_ISO_LEVEL iso_level;
tokudb_stmt_progress stmt_progress;
bool checkpoint_lock_taken;
} tokudb_trx_data;
......
......@@ -450,9 +450,6 @@ static int tokudb_commit(handlerton * hton, THD * thd, bool all) {
else if (tokudb_debug & TOKUDB_DEBUG_TXN) {
TOKUDB_TRACE("commit0\n");
}
if (all) {
trx->iso_level = hatoku_iso_not_set;
}
reset_stmt_progress(&trx->stmt_progress);
TOKUDB_DBUG_RETURN(0);
}
......@@ -477,9 +474,6 @@ static int tokudb_rollback(handlerton * hton, THD * thd, bool all) {
TOKUDB_TRACE("abort0\n");
}
}
if (all) {
trx->iso_level = hatoku_iso_not_set;
}
reset_stmt_progress(&trx->stmt_progress);
TOKUDB_DBUG_RETURN(0);
}
......
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