Commit 1ba7234b authored by Marko Mäkelä's avatar Marko Mäkelä

Follow-up to MDEV-11713: Make more use of DBUG_LOG

parent 7c81f15e
......@@ -3761,9 +3761,7 @@ FlushObserver::FlushObserver(
m_removed->at(i) = 0;
}
#ifdef FLUSH_LIST_OBSERVER_DEBUG
ib::info() << "FlushObserver constructor: " << m_trx->id;
#endif /* FLUSH_LIST_OBSERVER_DEBUG */
DBUG_LOG("flush", "FlushObserver(): trx->id=" << m_trx->id);
}
/** FlushObserver deconstructor */
......@@ -3774,9 +3772,7 @@ FlushObserver::~FlushObserver()
UT_DELETE(m_flushed);
UT_DELETE(m_removed);
#ifdef FLUSH_LIST_OBSERVER_DEBUG
ib::info() << "FlushObserver deconstructor: " << m_trx->id;
#endif /* FLUSH_LIST_OBSERVER_DEBUG */
DBUG_LOG("flush", "~FlushObserver(): trx->id=" << m_trx->id);
}
/** Check whether trx is interrupted
......@@ -3809,10 +3805,7 @@ FlushObserver::notify_flush(
m_stage->inc();
}
#ifdef FLUSH_LIST_OBSERVER_DEBUG
ib::info() << "Flush <" << bpage->id.space()
<< ", " << bpage->id.page_no() << ">";
#endif /* FLUSH_LIST_OBSERVER_DEBUG */
DBUG_LOG("flush", "Flush " << bpage->id);
}
/** Notify observer of a remove
......@@ -3827,10 +3820,7 @@ FlushObserver::notify_remove(
m_removed->at(buf_pool->instance_no)++;
#ifdef FLUSH_LIST_OBSERVER_DEBUG
ib::info() << "Remove <" << bpage->id.space()
<< ", " << bpage->id.page_no() << ">";
#endif /* FLUSH_LIST_OBSERVER_DEBUG */
DBUG_LOG("flush", "Remove " << bpage->id);
}
/** Flush dirty pages and wait. */
......
......@@ -7376,14 +7376,17 @@ fil_space_get_crypt_data(
space->crypt_data = fil_space_read_crypt_data(space_id, page, offset);
ut_free(buf);
#ifdef UNIV_DEBUG
ib::info() << "Read page 0 from tablespace for"
<< "space " << space_id
<< " name " << space->name
<< " key_id " << (space->crypt_data ? space->crypt_data->key_id : 0)
<< " encryption " << (space->crypt_data ? space->crypt_data->encryption : 0)
<< " handle " << node->handle;
#endif
DBUG_LOG("crypt",
"Read page 0 from"
<< " tablespace " << space_id
<< " name " << space->name
<< " key_id " << (space->crypt_data
? space->crypt_data->key_id
: 0)
<< " encryption "
<< (space->crypt_data
? space->crypt_data->encryption : 0)
<< " handle " << node->handle);
ut_a(space->id == space_id);
......
......@@ -487,10 +487,8 @@ fil_decompress_page(
*write_size = actual_size;
}
#ifdef UNIV_PAGECOMPRESS_DEBUG
ib::info() << "Preparing for decompress for len "
<< actual_size << ".";
#endif /* UNIV_PAGECOMPRESS_DEBUG */
DBUG_LOG("compress", "Preparing for decompress for len "
<< actual_size << ".");
switch(compression_alg) {
case PAGE_ZLIB_ALGORITHM:
......
......@@ -5255,13 +5255,13 @@ innobase_rollback(
error = trx_rollback_for_mysql(trx);
if (trx->state == TRX_STATE_FORCED_ROLLBACK) {
#ifdef UNIV_DEBUG
#ifndef DBUG_OFF
char buffer[1024];
ib::info() << "Forced rollback : "
<< thd_get_error_context_description(thd,
buffer, sizeof(buffer), 512);
#endif /* UNIV_DEBUG */
DBUG_LOG("trx", "Forced rollback: "
<< thd_get_error_context_description(
thd, buffer, sizeof buffer, 512));
#endif /* !DBUG_OFF */
trx->state = TRX_STATE_NOT_STARTED;
}
......
......@@ -2780,12 +2780,10 @@ RecLock::jump_queue(
ut_ad(conflict_lock->trx->lock.que_state == TRX_QUE_LOCK_WAIT);
ut_ad(conflict_lock->trx->lock.wait_lock == conflict_lock);
#ifdef UNIV_DEBUG
ib::info() << "Granting High Priority Transaction (ID): "
<< lock->trx->id << " the lock jumping over"
<< " waiting Transaction (ID): "
<< conflict_lock->trx->id;
#endif /* UNIV_DEBUG */
DBUG_LOG("trx",
"Granting High Priority Transaction "
<< lock->trx->id << " a lock jumping over"
<< " waiting Transaction " << conflict_lock->trx->id);
lock_reset_lock_and_trx_wait(lock);
return(true);
......@@ -2954,11 +2952,12 @@ RecLock::make_trx_hit_list(
/* Assert that it is not waiting for current record. */
ut_ad(trx->lock.wait_lock != next);
#ifdef UNIV_DEBUG
ib::info() << "High Priority Transaction (ID): "
<< lock->trx->id << " waking up blocking"
<< " transaction (ID): " << trx->id;
#endif /* UNIV_DEBUG */
DBUG_LOG("trx", "High Priority Transaction "
<< lock->trx->id
<< " waking up blocking transaction "
<< trx->id);
trx->lock.was_chosen_as_deadlock_victim = true;
lock_cancel_waiting_and_release(trx->lock.wait_lock);
trx_mutex_exit(trx);
......
......@@ -515,22 +515,22 @@ row_purge_remove_sec_if_poss_leaf(
page = btr_cur_get_page(btr_cur);
if (!lock_test_prdt_page_lock(
trx,
page_get_space_id(page),
page_get_page_no(page))
&& page_get_n_recs(page) < 2
&& page_get_page_no(page) !=
dict_index_get_page(index)) {
trx,
page_get_space_id(page),
page_get_page_no(page))
&& page_get_n_recs(page) < 2
&& btr_cur_get_block(btr_cur)
->page.id.page_no() !=
dict_index_get_page(index)) {
/* this is the last record on page,
and it has a "page" lock on it,
which mean search is still depending
on it, so do not delete */
#ifdef UNIV_DEBUG
ib::info() << "skip purging last"
" record on page "
<< page_get_page_no(page)
<< ".";
#endif /* UNIV_DEBUG */
DBUG_LOG("purge",
"skip purging last"
" record on page "
<< btr_cur_get_block(btr_cur)
->page.id);
btr_pcur_close(&pcur);
mtr_commit(&mtr);
......
......@@ -933,10 +933,9 @@ trx_purge_mark_undo_for_truncate(
return;
}
#ifdef UNIV_DEBUG
ib::info() << "UNDO tablespace with space identifier "
<< undo_trunc->get_marked_space_id() << " marked for truncate";
#endif /* UNIV_DEBUG */
DBUG_LOG("undo",
"marking for truncate UNDO tablespace "
<< undo_trunc->get_marked_space_id());
/* Step-3: Iterate over all the rsegs of selected UNDO tablespace
and mark them temporarily unavailable for allocation.*/
......
......@@ -3379,24 +3379,20 @@ trx_kill_blocking(trx_t* trx)
trx_mutex_exit(victim_trx);
#ifdef UNIV_DEBUG
#ifndef DBUG_OFF
char buffer[1024];
char* thr_text;
trx_id_t id;
#endif /* !DBUG_OFF */
thr_text = thd_get_error_context_description(victim_trx->mysql_thd,
buffer, sizeof(buffer),
512);
id = victim_trx->id;
#endif /* UNIV_DEBUG */
trx_rollback_for_mysql(victim_trx);
DBUG_LOG("trx",
"High Priority Transaction "
<< trx->id << " killed transaction "
<< victim_trx->id << " in hit list"
<< " - "
<< thd_get_error_context_description(
victim_trx->mysql_thd,
buffer, sizeof(buffer), 512));
#ifdef UNIV_DEBUG
ib::info() << "High Priority Transaction (ID): "
<< trx->id << " killed transaction (ID): "
<< id << " in hit list"
<< " - " << thr_text;
#endif /* UNIV_DEBUG */
trx_rollback_for_mysql(victim_trx);
trx_mutex_enter(victim_trx);
version++;
......
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