Commit 4a9dccc9 authored by Rich Prohaska's avatar Rich Prohaska

#168 remove obsolete is_fast_alter_running

parent 0d6c69d7
...@@ -1195,7 +1195,6 @@ ha_tokudb::ha_tokudb(handlerton * hton, TABLE_SHARE * table_arg):handler(hton, t ...@@ -1195,7 +1195,6 @@ ha_tokudb::ha_tokudb(handlerton * hton, TABLE_SHARE * table_arg):handler(hton, t
rec_buff = NULL; rec_buff = NULL;
rec_update_buff = NULL; rec_update_buff = NULL;
transaction = NULL; transaction = NULL;
is_fast_alter_running = false;
cursor = NULL; cursor = NULL;
fixed_cols_for_query = NULL; fixed_cols_for_query = NULL;
var_cols_for_query = NULL; var_cols_for_query = NULL;
...@@ -6055,7 +6054,6 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) { ...@@ -6055,7 +6054,6 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
} }
#endif #endif
if ((error = txn_begin(db_env, NULL, &trx->all, txn_begin_flags, thd))) { if ((error = txn_begin(db_env, NULL, &trx->all, txn_begin_flags, thd))) {
trx->tokudb_lock_count--; // We didn't get the lock
goto cleanup; goto cleanup;
} }
if (tokudb_debug & TOKUDB_DEBUG_TXN) { if (tokudb_debug & TOKUDB_DEBUG_TXN) {
...@@ -6092,7 +6090,6 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) { ...@@ -6092,7 +6090,6 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
} }
if ((error = txn_begin(db_env, trx->sp_level, &trx->stmt, txn_begin_flags, thd))) { if ((error = txn_begin(db_env, trx->sp_level, &trx->stmt, txn_begin_flags, thd))) {
/* We leave the possible master transaction open */ /* We leave the possible master transaction open */
trx->tokudb_lock_count--; // We didn't get the lock
goto cleanup; goto cleanup;
} }
trx->sub_sp_level = trx->stmt; trx->sub_sp_level = trx->stmt;
...@@ -6145,7 +6142,6 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) { ...@@ -6145,7 +6142,6 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) {
trx->sp_level = NULL; trx->sp_level = NULL;
} }
if (lock_type != F_UNLCK) { if (lock_type != F_UNLCK) {
is_fast_alter_running = false;
use_write_locks = false; use_write_locks = false;
if (lock_type == F_WRLCK) { if (lock_type == F_WRLCK) {
use_write_locks = true; use_write_locks = true;
...@@ -6155,6 +6151,7 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) { ...@@ -6155,6 +6151,7 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) {
transaction = NULL; // Safety transaction = NULL; // Safety
error = create_txn(thd, trx); error = create_txn(thd, trx);
if (error) { if (error) {
trx->tokudb_lock_count--; // We didn't get the lock
goto cleanup; goto cleanup;
} }
} }
...@@ -6182,18 +6179,12 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) { ...@@ -6182,18 +6179,12 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) {
*/ */
DBUG_PRINT("trans", ("commiting non-updating transaction")); DBUG_PRINT("trans", ("commiting non-updating transaction"));
reset_stmt_progress(&trx->stmt_progress); reset_stmt_progress(&trx->stmt_progress);
if (!is_fast_alter_running) { commit_txn(trx->stmt, 0);
commit_txn(trx->stmt, 0); trx->stmt = NULL;
if (tokudb_debug & TOKUDB_DEBUG_TXN) { trx->sub_sp_level = NULL;
TOKUDB_TRACE("commit:%p:%d", trx->stmt, error);
}
trx->stmt = NULL;
trx->sub_sp_level = NULL;
}
} }
} }
transaction = NULL; transaction = NULL;
is_fast_alter_running = false;
} }
cleanup: cleanup:
if (tokudb_debug & TOKUDB_DEBUG_LOCK) if (tokudb_debug & TOKUDB_DEBUG_LOCK)
......
...@@ -328,7 +328,6 @@ class ha_tokudb : public handler { ...@@ -328,7 +328,6 @@ class ha_tokudb : public handler {
// transaction used by ha_tokudb's cursor // transaction used by ha_tokudb's cursor
// //
DB_TXN *transaction; DB_TXN *transaction;
bool is_fast_alter_running;
// external_lock will set this true for read operations that will be closely followed by write operations. // external_lock will set this true for read operations that will be closely followed by write operations.
bool use_write_locks; // use write locks for reads bool use_write_locks; // use write locks for reads
......
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