summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorRich Prohaska <prohaska@tokutek.com>2014-01-15 17:28:56 -0500
committerRich Prohaska <prohaska@tokutek.com>2014-01-15 17:28:56 -0500
commit4a9dccc9ac1c2a1712abd96600601edabca77e28 (patch)
tree6c3899f44322261331edb50789beaa83a2b50c09 /storage
parent0d6c69d760ee253d49f54a665635e686a8559116 (diff)
downloadmariadb-git-4a9dccc9ac1c2a1712abd96600601edabca77e28.tar.gz
#168 remove obsolete is_fast_alter_running
Diffstat (limited to 'storage')
-rw-r--r--storage/tokudb/ha_tokudb.cc17
-rw-r--r--storage/tokudb/ha_tokudb.h1
2 files changed, 4 insertions, 14 deletions
diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc
index 8cbb4c9f184..55a1617a81c 100644
--- a/storage/tokudb/ha_tokudb.cc
+++ b/storage/tokudb/ha_tokudb.cc
@@ -1195,7 +1195,6 @@ ha_tokudb::ha_tokudb(handlerton * hton, TABLE_SHARE * table_arg):handler(hton, t
rec_buff = NULL;
rec_update_buff = NULL;
transaction = NULL;
- is_fast_alter_running = false;
cursor = NULL;
fixed_cols_for_query = NULL;
var_cols_for_query = NULL;
@@ -6055,7 +6054,6 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
}
#endif
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;
}
if (tokudb_debug & TOKUDB_DEBUG_TXN) {
@@ -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))) {
/* We leave the possible master transaction open */
- trx->tokudb_lock_count--; // We didn't get the lock
goto cleanup;
}
trx->sub_sp_level = trx->stmt;
@@ -6145,7 +6142,6 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) {
trx->sp_level = NULL;
}
if (lock_type != F_UNLCK) {
- is_fast_alter_running = false;
use_write_locks = false;
if (lock_type == F_WRLCK) {
use_write_locks = true;
@@ -6155,6 +6151,7 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) {
transaction = NULL; // Safety
error = create_txn(thd, trx);
if (error) {
+ trx->tokudb_lock_count--; // We didn't get the lock
goto cleanup;
}
}
@@ -6182,18 +6179,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) {
- commit_txn(trx->stmt, 0);
- if (tokudb_debug & TOKUDB_DEBUG_TXN) {
- TOKUDB_TRACE("commit:%p:%d", trx->stmt, error);
- }
- trx->stmt = NULL;
- trx->sub_sp_level = NULL;
- }
+ commit_txn(trx->stmt, 0);
+ trx->stmt = NULL;
+ trx->sub_sp_level = NULL;
}
}
transaction = NULL;
- is_fast_alter_running = false;
}
cleanup:
if (tokudb_debug & TOKUDB_DEBUG_LOCK)
diff --git a/storage/tokudb/ha_tokudb.h b/storage/tokudb/ha_tokudb.h
index 78938cd9f65..1a20f95d6b4 100644
--- a/storage/tokudb/ha_tokudb.h
+++ b/storage/tokudb/ha_tokudb.h
@@ -328,7 +328,6 @@ private:
// transaction used by ha_tokudb's cursor
//
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.
bool use_write_locks; // use write locks for reads