Commit 41468be9 authored by marko's avatar marko

branches/zip: Clean up debug code.

struct mtr_struct: Omit unused field "state" unless #ifdef UNIV_DEBUG.

buf_block_buf_fix_inc_debug(): Remove redundant __attribute__((unused))
and #ifdef UNIV_SYNC_DEBUG.
parent 3d085927
...@@ -522,16 +522,14 @@ void ...@@ -522,16 +522,14 @@ void
buf_block_buf_fix_inc_debug( buf_block_buf_fix_inc_debug(
/*========================*/ /*========================*/
buf_block_t* block, /* in: block to bufferfix */ buf_block_t* block, /* in: block to bufferfix */
const char* file __attribute__ ((unused)), /* in: file name */ const char* file, /* in: file name */
ulint line __attribute__ ((unused))) /* in: line */ ulint line) /* in: line */
{ {
#ifdef UNIV_SYNC_DEBUG
ibool ret; ibool ret;
ret = rw_lock_s_lock_func_nowait(&(block->debug_latch), file, line); ret = rw_lock_s_lock_func_nowait(&(block->debug_latch), file, line);
ut_a(ret);
ut_ad(ret == TRUE);
#endif
block->buf_fix_count++; block->buf_fix_count++;
} }
#else /* UNIV_SYNC_DEBUG */ #else /* UNIV_SYNC_DEBUG */
......
...@@ -323,7 +323,9 @@ struct mtr_memo_slot_struct{ ...@@ -323,7 +323,9 @@ struct mtr_memo_slot_struct{
/* Mini-transaction handle and buffer */ /* Mini-transaction handle and buffer */
struct mtr_struct{ struct mtr_struct{
#ifdef UNIV_DEBUG
ulint state; /* MTR_ACTIVE, MTR_COMMITTING, MTR_COMMITTED */ ulint state; /* MTR_ACTIVE, MTR_COMMITTING, MTR_COMMITTED */
#endif
dyn_array_t memo; /* memo stack for locks etc. */ dyn_array_t memo; /* memo stack for locks etc. */
dyn_array_t log; /* mini-transaction log */ dyn_array_t log; /* mini-transaction log */
ibool modifications; ibool modifications;
......
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