summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Prohaska <prohaska@tokutek.com>2014-04-07 16:58:51 -0400
committerRich Prohaska <prohaska@tokutek.com>2014-04-07 16:58:51 -0400
commitfb30dc2667555fded71c577e5e1eb5778c92efc3 (patch)
tree212ae73fb8a414c2f2bf5445f3861a7cb689732c
parent4a884235388998e61619f126068c07c93b2207c7 (diff)
downloadmariadb-git-fb30dc2667555fded71c577e5e1eb5778c92efc3.tar.gz
#208 debug create temp table and transactions
-rw-r--r--storage/tokudb/ha_tokudb.cc11
-rw-r--r--storage/tokudb/hatoku_hton.cc9
2 files changed, 6 insertions, 14 deletions
diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc
index 760527bdd75..f6fd19781ad 100644
--- a/storage/tokudb/ha_tokudb.cc
+++ b/storage/tokudb/ha_tokudb.cc
@@ -4487,7 +4487,7 @@ void ha_tokudb::invalidate_icp() {
// error otherwise
//
int ha_tokudb::index_init(uint keynr, bool sorted) {
- TOKUDB_HANDLER_DBUG_ENTER("%d", keynr);
+ TOKUDB_HANDLER_DBUG_ENTER("%d %u txn %p", keynr, sorted, transaction);
int error;
THD* thd = ha_thd();
@@ -6078,7 +6078,7 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
goto cleanup;
}
if (tokudb_debug & TOKUDB_DEBUG_TXN) {
- TOKUDB_HANDLER_TRACE("trx %p just created master %p", trx, trx->all);
+ TOKUDB_HANDLER_TRACE("created master %p", trx->all);
}
trx->sp_level = trx->all;
trans_register_ha(thd, true, tokudb_hton);
@@ -6115,7 +6115,7 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
}
trx->sub_sp_level = trx->stmt;
if (tokudb_debug & TOKUDB_DEBUG_TXN) {
- TOKUDB_HANDLER_TRACE("trx %p just created stmt %p %p", trx, trx->sp_level, trx->stmt);
+ TOKUDB_HANDLER_TRACE("created stmt %p sp_level %p", trx->sp_level, trx->stmt);
}
reset_stmt_progress(&trx->stmt_progress);
trans_register_ha(thd, false, tokudb_hton);
@@ -6162,9 +6162,6 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) {
error = create_tokudb_trx_data_instance(&trx);
if (error) { goto cleanup; }
thd_data_set(thd, tokudb_hton->slot, trx);
- if (tokudb_debug & TOKUDB_DEBUG_TXN) {
- TOKUDB_HANDLER_TRACE("set trx %p", trx);
- }
}
if (trx->all == NULL) {
trx->sp_level = NULL;
@@ -6252,7 +6249,7 @@ int ha_tokudb::start_stmt(THD * thd, thr_lock_type lock_type) {
goto cleanup;
}
if (tokudb_debug & TOKUDB_DEBUG_TXN) {
- TOKUDB_HANDLER_TRACE("trx %p %p %p %p %p %u", trx, trx->all, trx->stmt, trx->sp_level, trx->sub_sp_level, trx->tokudb_lock_count);
+ TOKUDB_HANDLER_TRACE("%p %p %p %p %u", trx->all, trx->stmt, trx->sp_level, trx->sub_sp_level, trx->tokudb_lock_count);
}
}
else {
diff --git a/storage/tokudb/hatoku_hton.cc b/storage/tokudb/hatoku_hton.cc
index fcfdc5e419f..edd522bd7d3 100644
--- a/storage/tokudb/hatoku_hton.cc
+++ b/storage/tokudb/hatoku_hton.cc
@@ -633,9 +633,6 @@ static int tokudb_close_connection(handlerton * hton, THD * thd) {
int error = 0;
tokudb_trx_data* trx = NULL;
trx = (tokudb_trx_data *) thd_data_get(thd, tokudb_hton->slot);
- if (tokudb_debug & TOKUDB_DEBUG_TXN) {
- TOKUDB_TRACE("trx %p", trx);
- }
if (trx && trx->checkpoint_lock_taken) {
error = db_env->checkpointing_resume(db_env);
}
@@ -645,7 +642,6 @@ static int tokudb_close_connection(handlerton * hton, THD * thd) {
struct tokudb_map_pair key = { thd, NULL };
struct tokudb_map_pair *found_key = (struct tokudb_map_pair *) tree_search(&tokudb_map, &key, NULL);
if (found_key) {
- if (0) TOKUDB_TRACE("thd %p %p", thd, found_key->last_lock_timeout);
tokudb_my_free(found_key->last_lock_timeout);
tree_delete(&tokudb_map, found_key, sizeof *found_key, NULL);
}
@@ -739,7 +735,7 @@ static int tokudb_commit(handlerton * hton, THD * thd, bool all) {
DB_TXN *this_txn = *txn;
if (this_txn) {
if (tokudb_debug & TOKUDB_DEBUG_TXN) {
- TOKUDB_TRACE("commit trx %u trx %p txn %p", all, trx, this_txn);
+ TOKUDB_TRACE("commit trx %u txn %p", all, this_txn);
}
// test hook to induce a crash on a debug build
DBUG_EXECUTE_IF("tokudb_crash_commit_before", DBUG_SUICIDE(););
@@ -768,7 +764,7 @@ static int tokudb_rollback(handlerton * hton, THD * thd, bool all) {
DB_TXN *this_txn = *txn;
if (this_txn) {
if (tokudb_debug & TOKUDB_DEBUG_TXN) {
- TOKUDB_TRACE("rollback %u trx %p txn %p", all, trx, this_txn);
+ TOKUDB_TRACE("rollback %u txn %p", all, this_txn);
}
tokudb_cleanup_handlers(trx, this_txn);
abort_txn_with_progress(this_txn, thd);
@@ -1959,7 +1955,6 @@ static void tokudb_lock_timeout_callback(DB *db, uint64_t requesting_txnid, cons
THDVAR(thd, last_lock_timeout) = new_lock_timeout;
tokudb_my_free(old_lock_timeout);
#if TOKU_THDVAR_MEMALLOC_BUG
- if (0) TOKUDB_TRACE("thd %p %p %p", thd, old_lock_timeout, new_lock_timeout);
tokudb_pthread_mutex_lock(&tokudb_map_mutex);
struct tokudb_map_pair old_key = { thd, old_lock_timeout };
tree_delete(&tokudb_map, &old_key, sizeof old_key, NULL);