mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
InnoDB: Revert most of ChangeSet@1.1772, as the debug functions may
be needed when testing production releases innobase/btr/btr0btr.c: Remove #ifdef UNIV_DEBUG around debug code innobase/buf/buf0buf.c: Remove #ifdef UNIV_DEBUG around debug code innobase/buf/buf0flu.c: Remove #ifdef UNIV_DEBUG around debug code innobase/buf/buf0lru.c: Remove #ifdef UNIV_DEBUG around debug code innobase/buf/buf0rea.c: Remove #ifdef UNIV_DEBUG around debug code innobase/data/data0type.c: Remove #ifdef UNIV_DEBUG around debug code innobase/dict/dict0dict.c: Remove #ifdef UNIV_DEBUG around debug code innobase/fsp/fsp0fsp.c: Remove #ifdef UNIV_DEBUG around debug code innobase/fut/fut0lst.c: Remove #ifdef UNIV_DEBUG around debug code innobase/ibuf/ibuf0ibuf.c: Remove #ifdef UNIV_DEBUG around debug code innobase/include/btr0btr.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/buf0buf.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/buf0buf.ic: Remove #ifdef UNIV_DEBUG around debug code innobase/include/buf0flu.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/buf0lru.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/data0type.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/dict0dict.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/fsp0fsp.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/fut0lst.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/lock0lock.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/mem0dbg.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/mem0dbg.ic: Remove #ifdef UNIV_DEBUG around debug code innobase/include/mem0pool.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/mtr0mtr.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/pars0opt.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/sync0rw.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/sync0sync.h: Remove #ifdef UNIV_DEBUG around debug code innobase/lock/lock0lock.c: Remove #ifdef UNIV_DEBUG around debug code innobase/mem/mem0dbg.c: Remove #ifdef UNIV_DEBUG around debug code innobase/mem/mem0pool.c: Remove #ifdef UNIV_DEBUG around debug code innobase/mtr/mtr0mtr.c: Remove #ifdef UNIV_DEBUG around debug code innobase/pars/pars0opt.c: Remove #ifdef UNIV_DEBUG around debug code innobase/srv/srv0start.c: Remove #ifdef UNIV_DEBUG around debug code innobase/sync/sync0rw.c: Remove #ifdef UNIV_DEBUG around debug code innobase/sync/sync0sync.c: Remove #ifdef UNIV_DEBUG around debug code innobase/trx/trx0roll.c: Remove #ifdef UNIV_DEBUG around debug code
This commit is contained in:
@ -2162,7 +2162,6 @@ btr_discard_page(
|
|||||||
ut_ad(btr_check_node_ptr(tree, merge_page, mtr));
|
ut_ad(btr_check_node_ptr(tree, merge_page, mtr));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
Prints size info of a B-tree. */
|
Prints size info of a B-tree. */
|
||||||
|
|
||||||
@ -2283,7 +2282,6 @@ btr_print_tree(
|
|||||||
|
|
||||||
btr_validate_tree(tree);
|
btr_validate_tree(tree);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/****************************************************************
|
/****************************************************************
|
||||||
Checks that the node pointer to a page is appropriate. */
|
Checks that the node pointer to a page is appropriate. */
|
||||||
|
@ -201,14 +201,12 @@ the read requests for the whole area. */
|
|||||||
|
|
||||||
buf_pool_t* buf_pool = NULL; /* The buffer buf_pool of the database */
|
buf_pool_t* buf_pool = NULL; /* The buffer buf_pool of the database */
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
ulint buf_dbg_counter = 0; /* This is used to insert validation
|
||||||
static ulint buf_dbg_counter = 0; /* This is used to insert validation
|
|
||||||
operations in excution in the
|
operations in excution in the
|
||||||
debug version */
|
debug version */
|
||||||
ibool buf_debug_prints = FALSE; /* If this is set TRUE,
|
ibool buf_debug_prints = FALSE; /* If this is set TRUE,
|
||||||
the program prints info whenever
|
the program prints info whenever
|
||||||
read-ahead or flush occurs */
|
read-ahead or flush occurs */
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Calculates a page checksum which is stored to the page when it is written
|
Calculates a page checksum which is stored to the page when it is written
|
||||||
@ -1457,12 +1455,10 @@ buf_page_create(
|
|||||||
|
|
||||||
/* If we get here, the page was not in buf_pool: init it there */
|
/* If we get here, the page was not in buf_pool: init it there */
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (buf_debug_prints) {
|
if (buf_debug_prints) {
|
||||||
fprintf(stderr, "Creating space %lu page %lu to buffer\n",
|
fprintf(stderr, "Creating space %lu page %lu to buffer\n",
|
||||||
space, offset);
|
space, offset);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
block = free_block;
|
block = free_block;
|
||||||
|
|
||||||
@ -1613,11 +1609,9 @@ buf_page_io_complete(
|
|||||||
rw_lock_x_unlock_gen(&(block->lock), BUF_IO_READ);
|
rw_lock_x_unlock_gen(&(block->lock), BUF_IO_READ);
|
||||||
rw_lock_x_unlock_gen(&(block->read_lock), BUF_IO_READ);
|
rw_lock_x_unlock_gen(&(block->read_lock), BUF_IO_READ);
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (buf_debug_prints) {
|
if (buf_debug_prints) {
|
||||||
fputs("Has read ", stderr);
|
fputs("Has read ", stderr);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
} else {
|
} else {
|
||||||
ut_ad(io_type == BUF_IO_WRITE);
|
ut_ad(io_type == BUF_IO_WRITE);
|
||||||
|
|
||||||
@ -1630,21 +1624,17 @@ buf_page_io_complete(
|
|||||||
|
|
||||||
buf_pool->n_pages_written++;
|
buf_pool->n_pages_written++;
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (buf_debug_prints) {
|
if (buf_debug_prints) {
|
||||||
fputs("Has written ", stderr);
|
fputs("Has written ", stderr);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_exit(&(buf_pool->mutex));
|
mutex_exit(&(buf_pool->mutex));
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (buf_debug_prints) {
|
if (buf_debug_prints) {
|
||||||
fprintf(stderr, "page space %lu page no %lu\n",
|
fprintf(stderr, "page space %lu page no %lu\n",
|
||||||
block->space, block->offset);
|
block->space, block->offset);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
@ -1673,7 +1663,6 @@ buf_pool_invalidate(void)
|
|||||||
mutex_exit(&(buf_pool->mutex));
|
mutex_exit(&(buf_pool->mutex));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Validates the buffer buf_pool data structure. */
|
Validates the buffer buf_pool data structure. */
|
||||||
|
|
||||||
@ -1872,7 +1861,6 @@ buf_print(void)
|
|||||||
|
|
||||||
ut_a(buf_validate());
|
ut_a(buf_validate());
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Returns the number of pending buf pool ios. */
|
Returns the number of pending buf pool ios. */
|
||||||
|
@ -31,7 +31,6 @@ flushed along with the original page. */
|
|||||||
#define BUF_FLUSH_AREA ut_min(BUF_READ_AHEAD_AREA,\
|
#define BUF_FLUSH_AREA ut_min(BUF_READ_AHEAD_AREA,\
|
||||||
buf_pool->curr_size / 16)
|
buf_pool->curr_size / 16)
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Validates the flush list. */
|
Validates the flush list. */
|
||||||
static
|
static
|
||||||
@ -39,7 +38,6 @@ ibool
|
|||||||
buf_flush_validate_low(void);
|
buf_flush_validate_low(void);
|
||||||
/*========================*/
|
/*========================*/
|
||||||
/* out: TRUE if ok */
|
/* out: TRUE if ok */
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Inserts a modified block into the flush list. */
|
Inserts a modified block into the flush list. */
|
||||||
@ -490,13 +488,11 @@ buf_flush_try_page(
|
|||||||
rw_lock_s_lock_gen(&(block->lock), BUF_IO_WRITE);
|
rw_lock_s_lock_gen(&(block->lock), BUF_IO_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (buf_debug_prints) {
|
if (buf_debug_prints) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Flushing page space %lu, page no %lu \n",
|
"Flushing page space %lu, page no %lu \n",
|
||||||
block->space, block->offset);
|
block->space, block->offset);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
buf_flush_write_block_low(block);
|
buf_flush_write_block_low(block);
|
||||||
|
|
||||||
@ -552,13 +548,11 @@ buf_flush_try_page(
|
|||||||
|
|
||||||
rw_lock_s_lock_gen(&(block->lock), BUF_IO_WRITE);
|
rw_lock_s_lock_gen(&(block->lock), BUF_IO_WRITE);
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (buf_debug_prints) {
|
if (buf_debug_prints) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Flushing single page space %lu, page no %lu \n",
|
"Flushing single page space %lu, page no %lu \n",
|
||||||
block->space, block->offset);
|
block->space, block->offset);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
buf_flush_write_block_low(block);
|
buf_flush_write_block_low(block);
|
||||||
|
|
||||||
@ -785,7 +779,6 @@ buf_flush_batch(
|
|||||||
|
|
||||||
buf_flush_buffered_writes();
|
buf_flush_buffered_writes();
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (buf_debug_prints && page_count > 0) {
|
if (buf_debug_prints && page_count > 0) {
|
||||||
ut_a(flush_type == BUF_FLUSH_LRU
|
ut_a(flush_type == BUF_FLUSH_LRU
|
||||||
|| flush_type == BUF_FLUSH_LIST);
|
|| flush_type == BUF_FLUSH_LIST);
|
||||||
@ -794,7 +787,6 @@ buf_flush_batch(
|
|||||||
: "Flushed %lu pages in flush list flush\n",
|
: "Flushed %lu pages in flush list flush\n",
|
||||||
page_count);
|
page_count);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
return(page_count);
|
return(page_count);
|
||||||
}
|
}
|
||||||
@ -886,7 +878,6 @@ buf_flush_free_margin(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Validates the flush list. */
|
Validates the flush list. */
|
||||||
static
|
static
|
||||||
@ -936,4 +927,3 @@ buf_flush_validate(void)
|
|||||||
|
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
@ -125,13 +125,11 @@ buf_LRU_search_and_free_block(
|
|||||||
|
|
||||||
if (buf_flush_ready_for_replace(block)) {
|
if (buf_flush_ready_for_replace(block)) {
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (buf_debug_prints) {
|
if (buf_debug_prints) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Putting space %lu page %lu to free list\n",
|
"Putting space %lu page %lu to free list\n",
|
||||||
block->space, block->offset);
|
block->space, block->offset);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
buf_LRU_block_remove_hashed_page(block);
|
buf_LRU_block_remove_hashed_page(block);
|
||||||
|
|
||||||
@ -707,7 +705,6 @@ buf_LRU_block_free_hashed_page(
|
|||||||
buf_LRU_block_free_non_file_page(block);
|
buf_LRU_block_free_non_file_page(block);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
Validates the LRU list. */
|
Validates the LRU list. */
|
||||||
|
|
||||||
@ -838,4 +835,3 @@ buf_LRU_print(void)
|
|||||||
|
|
||||||
mutex_exit(&(buf_pool->mutex));
|
mutex_exit(&(buf_pool->mutex));
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
@ -101,13 +101,11 @@ buf_read_page_low(
|
|||||||
block = buf_page_init_for_read(mode, space, offset);
|
block = buf_page_init_for_read(mode, space, offset);
|
||||||
|
|
||||||
if (block != NULL) {
|
if (block != NULL) {
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (buf_debug_prints) {
|
if (buf_debug_prints) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Posting read request for page %lu, sync %lu\n",
|
"Posting read request for page %lu, sync %lu\n",
|
||||||
offset, sync);
|
offset, sync);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
fil_io(OS_FILE_READ | wake_later,
|
fil_io(OS_FILE_READ | wake_later,
|
||||||
sync, space, offset, 0, UNIV_PAGE_SIZE,
|
sync, space, offset, 0, UNIV_PAGE_SIZE,
|
||||||
@ -244,13 +242,11 @@ buf_read_ahead_random(
|
|||||||
|
|
||||||
os_aio_simulated_wake_handler_threads();
|
os_aio_simulated_wake_handler_threads();
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (buf_debug_prints && (count > 0)) {
|
if (buf_debug_prints && (count > 0)) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Random read-ahead space %lu offset %lu pages %lu\n",
|
"Random read-ahead space %lu offset %lu pages %lu\n",
|
||||||
space, offset, count);
|
space, offset, count);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
return(count);
|
return(count);
|
||||||
}
|
}
|
||||||
@ -504,13 +500,11 @@ buf_read_ahead_linear(
|
|||||||
/* Flush pages from the end of the LRU list if necessary */
|
/* Flush pages from the end of the LRU list if necessary */
|
||||||
buf_flush_free_margin();
|
buf_flush_free_margin();
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (buf_debug_prints && (count > 0)) {
|
if (buf_debug_prints && (count > 0)) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"LINEAR read-ahead space %lu offset %lu pages %lu\n",
|
"LINEAR read-ahead space %lu offset %lu pages %lu\n",
|
||||||
space, offset, count);
|
space, offset, count);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
return(count);
|
return(count);
|
||||||
}
|
}
|
||||||
@ -555,13 +549,11 @@ buf_read_ibuf_merge_pages(
|
|||||||
/* Flush pages from the end of the LRU list if necessary */
|
/* Flush pages from the end of the LRU list if necessary */
|
||||||
buf_flush_free_margin();
|
buf_flush_free_margin();
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (buf_debug_prints) {
|
if (buf_debug_prints) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Ibuf merge read-ahead space %lu pages %lu\n",
|
"Ibuf merge read-ahead space %lu pages %lu\n",
|
||||||
space, n_stored);
|
space, n_stored);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
@ -621,10 +613,8 @@ buf_read_recv_pages(
|
|||||||
/* Flush pages from the end of the LRU list if necessary */
|
/* Flush pages from the end of the LRU list if necessary */
|
||||||
buf_flush_free_margin();
|
buf_flush_free_margin();
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (buf_debug_prints) {
|
if (buf_debug_prints) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Recovery applies read-ahead pages %lu\n", n_stored);
|
"Recovery applies read-ahead pages %lu\n", n_stored);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@ Created 1/16/1996 Heikki Tuuri
|
|||||||
dtype_t dtype_binary_val = {DATA_BINARY, 0, 0, 0};
|
dtype_t dtype_binary_val = {DATA_BINARY, 0, 0, 0};
|
||||||
dtype_t* dtype_binary = &dtype_binary_val;
|
dtype_t* dtype_binary = &dtype_binary_val;
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Validates a data type structure. */
|
Validates a data type structure. */
|
||||||
|
|
||||||
@ -34,7 +33,6 @@ dtype_validate(
|
|||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Prints a data type structure. */
|
Prints a data type structure. */
|
||||||
|
@ -3820,7 +3820,6 @@ dict_foreign_print_low(
|
|||||||
fputs(" )\n", stderr);
|
fputs(" )\n", stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
Prints a table data. */
|
Prints a table data. */
|
||||||
|
|
||||||
@ -3853,7 +3852,6 @@ dict_table_print_by_name(
|
|||||||
dict_table_print_low(table);
|
dict_table_print_low(table);
|
||||||
mutex_exit(&(dict_sys->mutex));
|
mutex_exit(&(dict_sys->mutex));
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
Prints a table data. */
|
Prints a table data. */
|
||||||
|
@ -3236,8 +3236,7 @@ fseg_validate_low(
|
|||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
Validates a segment. */
|
Validates a segment. */
|
||||||
|
|
||||||
@ -3262,7 +3261,6 @@ fseg_validate(
|
|||||||
|
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
Writes info of a segment. */
|
Writes info of a segment. */
|
||||||
@ -3313,7 +3311,6 @@ fseg_print_low(
|
|||||||
n_frag, n_free, n_not_full, n_used);
|
n_frag, n_free, n_not_full, n_used);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
Writes info of a segment. */
|
Writes info of a segment. */
|
||||||
|
|
||||||
@ -3334,7 +3331,6 @@ fseg_print(
|
|||||||
|
|
||||||
fseg_print_low(inode, mtr);
|
fseg_print_low(inode, mtr);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
Validates the file space system and its segments. */
|
Validates the file space system and its segments. */
|
||||||
|
@ -490,7 +490,6 @@ flst_validate(
|
|||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Prints info of a file-based list. */
|
Prints info of a file-based list. */
|
||||||
|
|
||||||
@ -516,4 +515,3 @@ flst_print(
|
|||||||
buf_frame_get_space_id(frame), buf_frame_get_page_no(frame),
|
buf_frame_get_space_id(frame), buf_frame_get_page_no(frame),
|
||||||
(ulint) (base - frame), len);
|
(ulint) (base - frame), len);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
@ -172,15 +172,13 @@ because ibuf merge is done to a page when it is read in, and it is
|
|||||||
still physically like the index page even if the index would have been
|
still physically like the index page even if the index would have been
|
||||||
dropped! So, there seems to be no problem. */
|
dropped! So, there seems to be no problem. */
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Validates the ibuf data structures when the caller owns ibuf_mutex. */
|
Validates the ibuf data structures when the caller owns ibuf_mutex. */
|
||||||
static
|
|
||||||
ibool
|
ibool
|
||||||
ibuf_validate_low(void);
|
ibuf_validate_low(void);
|
||||||
/*===================*/
|
/*===================*/
|
||||||
/* out: TRUE if ok */
|
/* out: TRUE if ok */
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Sets the flag in the current OS thread local storage denoting that it is
|
Sets the flag in the current OS thread local storage denoting that it is
|
||||||
@ -2754,10 +2752,9 @@ reset_bit:
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Validates the ibuf data structures when the caller owns ibuf_mutex. */
|
Validates the ibuf data structures when the caller owns ibuf_mutex. */
|
||||||
static
|
|
||||||
ibool
|
ibool
|
||||||
ibuf_validate_low(void)
|
ibuf_validate_low(void)
|
||||||
/*===================*/
|
/*===================*/
|
||||||
@ -2784,7 +2781,6 @@ ibuf_validate_low(void)
|
|||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Prints info of ibuf. */
|
Prints info of ibuf. */
|
||||||
|
@ -392,7 +392,6 @@ btr_page_free_low(
|
|||||||
page_t* page, /* in: page to be freed, x-latched */
|
page_t* page, /* in: page to be freed, x-latched */
|
||||||
ulint level, /* in: page level */
|
ulint level, /* in: page level */
|
||||||
mtr_t* mtr); /* in: mtr */
|
mtr_t* mtr); /* in: mtr */
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
Prints size info of a B-tree. */
|
Prints size info of a B-tree. */
|
||||||
|
|
||||||
@ -409,7 +408,6 @@ btr_print_tree(
|
|||||||
dict_tree_t* tree, /* in: tree */
|
dict_tree_t* tree, /* in: tree */
|
||||||
ulint width); /* in: print this many entries from start
|
ulint width); /* in: print this many entries from start
|
||||||
and end */
|
and end */
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
/****************************************************************
|
/****************************************************************
|
||||||
Checks the size and number of fields in a record based on the definition of
|
Checks the size and number of fields in a record based on the definition of
|
||||||
the index. */
|
the index. */
|
||||||
|
@ -53,11 +53,9 @@ Created 11/5/1995 Heikki Tuuri
|
|||||||
#define BUF_KEEP_OLD 52
|
#define BUF_KEEP_OLD 52
|
||||||
|
|
||||||
extern buf_pool_t* buf_pool; /* The buffer pool of the database */
|
extern buf_pool_t* buf_pool; /* The buffer pool of the database */
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
extern ibool buf_debug_prints;/* If this is set TRUE, the program
|
extern ibool buf_debug_prints;/* If this is set TRUE, the program
|
||||||
prints info whenever read or flush
|
prints info whenever read or flush
|
||||||
occurs */
|
occurs */
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Initializes the buffer pool of the database. */
|
Initializes the buffer pool of the database. */
|
||||||
@ -454,14 +452,12 @@ buf_pool_is_block(
|
|||||||
/*==============*/
|
/*==============*/
|
||||||
/* out: TRUE if pointer to block */
|
/* out: TRUE if pointer to block */
|
||||||
void* ptr); /* in: pointer to memory */
|
void* ptr); /* in: pointer to memory */
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Validates the buffer pool data structure. */
|
Validates the buffer pool data structure. */
|
||||||
|
|
||||||
ibool
|
ibool
|
||||||
buf_validate(void);
|
buf_validate(void);
|
||||||
/*==============*/
|
/*==============*/
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Prints a page to stderr. */
|
Prints a page to stderr. */
|
||||||
|
|
||||||
@ -820,7 +816,7 @@ struct buf_pool_struct{
|
|||||||
|
|
||||||
ulint n_pend_reads; /* number of pending read operations */
|
ulint n_pend_reads; /* number of pending read operations */
|
||||||
|
|
||||||
time_t last_printout_time; /* when buf_print_io was last time
|
time_t last_printout_time; /* when buf_print was last time
|
||||||
called */
|
called */
|
||||||
ulint n_pages_read; /* number read operations */
|
ulint n_pages_read; /* number read operations */
|
||||||
ulint n_pages_written;/* number write operations */
|
ulint n_pages_written;/* number write operations */
|
||||||
@ -832,10 +828,10 @@ struct buf_pool_struct{
|
|||||||
counted as page gets; this field
|
counted as page gets; this field
|
||||||
is NOT protected by the buffer
|
is NOT protected by the buffer
|
||||||
pool mutex */
|
pool mutex */
|
||||||
ulint n_page_gets_old;/* n_page_gets when buf_print_io was
|
ulint n_page_gets_old;/* n_page_gets when buf_print was
|
||||||
last time called: used to calculate
|
last time called: used to calculate
|
||||||
hit rate */
|
hit rate */
|
||||||
ulint n_pages_read_old;/* n_pages_read when buf_print_io was
|
ulint n_pages_read_old;/* n_pages_read when buf_print was
|
||||||
last time called */
|
last time called */
|
||||||
ulint n_pages_written_old;/* number write operations */
|
ulint n_pages_written_old;/* number write operations */
|
||||||
ulint n_pages_created_old;/* number of pages created in
|
ulint n_pages_created_old;/* number of pages created in
|
||||||
|
@ -11,6 +11,10 @@ Created 11/5/1995 Heikki Tuuri
|
|||||||
#include "buf0rea.h"
|
#include "buf0rea.h"
|
||||||
#include "mtr0mtr.h"
|
#include "mtr0mtr.h"
|
||||||
|
|
||||||
|
extern ulint buf_dbg_counter; /* This is used to insert validation
|
||||||
|
operations in execution in the
|
||||||
|
debug version */
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Recommends a move of a block to the start of the LRU list if there is danger
|
Recommends a move of a block to the start of the LRU list if there is danger
|
||||||
of dropping from the buffer pool. NOTE: does not reserve the buffer pool
|
of dropping from the buffer pool. NOTE: does not reserve the buffer pool
|
||||||
|
@ -97,7 +97,6 @@ buf_flush_ready_for_replace(
|
|||||||
/* out: TRUE if can replace immediately */
|
/* out: TRUE if can replace immediately */
|
||||||
buf_block_t* block); /* in: buffer control block, must be in state
|
buf_block_t* block); /* in: buffer control block, must be in state
|
||||||
BUF_BLOCK_FILE_PAGE and in the LRU list */
|
BUF_BLOCK_FILE_PAGE and in the LRU list */
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Validates the flush list. */
|
Validates the flush list. */
|
||||||
|
|
||||||
@ -105,7 +104,6 @@ ibool
|
|||||||
buf_flush_validate(void);
|
buf_flush_validate(void);
|
||||||
/*====================*/
|
/*====================*/
|
||||||
/* out: TRUE if ok */
|
/* out: TRUE if ok */
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/* When buf_flush_free_margin is called, it tries to make this many blocks
|
/* When buf_flush_free_margin is called, it tries to make this many blocks
|
||||||
available to replacement in the free list and at the end of the LRU list (to
|
available to replacement in the free list and at the end of the LRU list (to
|
||||||
|
@ -100,7 +100,6 @@ void
|
|||||||
buf_LRU_make_block_old(
|
buf_LRU_make_block_old(
|
||||||
/*===================*/
|
/*===================*/
|
||||||
buf_block_t* block); /* in: control block */
|
buf_block_t* block); /* in: control block */
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
Validates the LRU list. */
|
Validates the LRU list. */
|
||||||
|
|
||||||
@ -113,7 +112,6 @@ Prints the LRU list. */
|
|||||||
void
|
void
|
||||||
buf_LRU_print(void);
|
buf_LRU_print(void);
|
||||||
/*===============*/
|
/*===============*/
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
#ifndef UNIV_NONINL
|
#ifndef UNIV_NONINL
|
||||||
#include "buf0lru.ic"
|
#include "buf0lru.ic"
|
||||||
|
@ -190,7 +190,6 @@ dtype_read_for_order_and_null_size(
|
|||||||
/*===============================*/
|
/*===============================*/
|
||||||
dtype_t* type, /* in: type struct */
|
dtype_t* type, /* in: type struct */
|
||||||
byte* buf); /* in: buffer for the stored order info */
|
byte* buf); /* in: buffer for the stored order info */
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Validates a data type structure. */
|
Validates a data type structure. */
|
||||||
|
|
||||||
@ -199,7 +198,6 @@ dtype_validate(
|
|||||||
/*===========*/
|
/*===========*/
|
||||||
/* out: TRUE if ok */
|
/* out: TRUE if ok */
|
||||||
dtype_t* type); /* in: type struct to validate */
|
dtype_t* type); /* in: type struct to validate */
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Prints a data type structure. */
|
Prints a data type structure. */
|
||||||
|
|
||||||
|
@ -301,14 +301,6 @@ dict_table_get_index_noninline(
|
|||||||
dict_table_t* table, /* in: table */
|
dict_table_t* table, /* in: table */
|
||||||
char* name); /* in: index name */
|
char* name); /* in: index name */
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
Prints a table data. */
|
|
||||||
|
|
||||||
void
|
|
||||||
dict_table_print_low(
|
|
||||||
/*=================*/
|
|
||||||
dict_table_t* table); /* in: table */
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/**************************************************************************
|
|
||||||
Prints a table definition. */
|
Prints a table definition. */
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -316,13 +308,19 @@ dict_table_print(
|
|||||||
/*=============*/
|
/*=============*/
|
||||||
dict_table_t* table); /* in: table */
|
dict_table_t* table); /* in: table */
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
|
Prints a table data. */
|
||||||
|
|
||||||
|
void
|
||||||
|
dict_table_print_low(
|
||||||
|
/*=================*/
|
||||||
|
dict_table_t* table); /* in: table */
|
||||||
|
/**************************************************************************
|
||||||
Prints a table data when we know the table name. */
|
Prints a table data when we know the table name. */
|
||||||
|
|
||||||
void
|
void
|
||||||
dict_table_print_by_name(
|
dict_table_print_by_name(
|
||||||
/*=====================*/
|
/*=====================*/
|
||||||
char* name);
|
char* name);
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
Outputs info on foreign keys of a table. */
|
Outputs info on foreign keys of a table. */
|
||||||
|
|
||||||
|
@ -297,7 +297,6 @@ void
|
|||||||
fsp_print(
|
fsp_print(
|
||||||
/*======*/
|
/*======*/
|
||||||
ulint space); /* in: space id */
|
ulint space); /* in: space id */
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
Validates a segment. */
|
Validates a segment. */
|
||||||
|
|
||||||
@ -315,7 +314,6 @@ fseg_print(
|
|||||||
/*=======*/
|
/*=======*/
|
||||||
fseg_header_t* header, /* in: segment header */
|
fseg_header_t* header, /* in: segment header */
|
||||||
mtr_t* mtr); /* in: mtr */
|
mtr_t* mtr); /* in: mtr */
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/* Flags for fsp_reserve_free_extents */
|
/* Flags for fsp_reserve_free_extents */
|
||||||
#define FSP_NORMAL 1000000
|
#define FSP_NORMAL 1000000
|
||||||
|
@ -181,7 +181,6 @@ flst_validate(
|
|||||||
/* out: TRUE if ok */
|
/* out: TRUE if ok */
|
||||||
flst_base_node_t* base, /* in: pointer to base node of list */
|
flst_base_node_t* base, /* in: pointer to base node of list */
|
||||||
mtr_t* mtr1); /* in: mtr */
|
mtr_t* mtr1); /* in: mtr */
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Prints info of a file-based list. */
|
Prints info of a file-based list. */
|
||||||
|
|
||||||
@ -190,7 +189,7 @@ flst_print(
|
|||||||
/*=======*/
|
/*=======*/
|
||||||
flst_base_node_t* base, /* in: pointer to base node of list */
|
flst_base_node_t* base, /* in: pointer to base node of list */
|
||||||
mtr_t* mtr); /* in: mtr */
|
mtr_t* mtr); /* in: mtr */
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
#ifndef UNIV_NONINL
|
#ifndef UNIV_NONINL
|
||||||
#include "fut0lst.ic"
|
#include "fut0lst.ic"
|
||||||
|
@ -19,9 +19,7 @@ Created 5/7/1996 Heikki Tuuri
|
|||||||
#include "read0types.h"
|
#include "read0types.h"
|
||||||
#include "hash0hash.h"
|
#include "hash0hash.h"
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
extern ibool lock_print_waits;
|
extern ibool lock_print_waits;
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
/* Buffer for storing information about the most recent deadlock error */
|
/* Buffer for storing information about the most recent deadlock error */
|
||||||
extern FILE* lock_latest_err_file;
|
extern FILE* lock_latest_err_file;
|
||||||
|
|
||||||
@ -475,7 +473,6 @@ lock_check_trx_id_sanity(
|
|||||||
dict_index_t* index, /* in: clustered index */
|
dict_index_t* index, /* in: clustered index */
|
||||||
ibool has_kernel_mutex);/* in: TRUE if the caller owns the
|
ibool has_kernel_mutex);/* in: TRUE if the caller owns the
|
||||||
kernel mutex */
|
kernel mutex */
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Validates the lock queue on a single record. */
|
Validates the lock queue on a single record. */
|
||||||
|
|
||||||
@ -485,7 +482,6 @@ lock_rec_queue_validate(
|
|||||||
/* out: TRUE if ok */
|
/* out: TRUE if ok */
|
||||||
rec_t* rec, /* in: record to look at */
|
rec_t* rec, /* in: record to look at */
|
||||||
dict_index_t* index); /* in: index, or NULL if not known */
|
dict_index_t* index); /* in: index, or NULL if not known */
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Prints info of a table lock. */
|
Prints info of a table lock. */
|
||||||
|
|
||||||
@ -509,7 +505,6 @@ void
|
|||||||
lock_print_info(
|
lock_print_info(
|
||||||
/*============*/
|
/*============*/
|
||||||
FILE* file); /* in: file where to print */
|
FILE* file); /* in: file where to print */
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Validates the lock queue on a table. */
|
Validates the lock queue on a table. */
|
||||||
|
|
||||||
@ -534,7 +529,6 @@ ibool
|
|||||||
lock_validate(void);
|
lock_validate(void);
|
||||||
/*===============*/
|
/*===============*/
|
||||||
/* out: TRUE if ok */
|
/* out: TRUE if ok */
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/* The lock system */
|
/* The lock system */
|
||||||
extern lock_sys_t* lock_sys;
|
extern lock_sys_t* lock_sys;
|
||||||
|
@ -31,7 +31,6 @@ check fields at the both ends of the field. */
|
|||||||
#define MEM_SPACE_NEEDED(N) ut_calc_align((N), UNIV_MEM_ALIGNMENT)
|
#define MEM_SPACE_NEEDED(N) ut_calc_align((N), UNIV_MEM_ALIGNMENT)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
Checks a memory heap for consistency and prints the contents if requested.
|
Checks a memory heap for consistency and prints the contents if requested.
|
||||||
Outputs the sum of sizes of buffers given to the user (only in
|
Outputs the sum of sizes of buffers given to the user (only in
|
||||||
@ -61,7 +60,6 @@ mem_heap_validate_or_print(
|
|||||||
ulint* n_blocks); /* out: number of blocks in the heap,
|
ulint* n_blocks); /* out: number of blocks in the heap,
|
||||||
if a NULL pointer is passed as this
|
if a NULL pointer is passed as this
|
||||||
argument, it is ignored */
|
argument, it is ignored */
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
#ifdef UNIV_MEM_DEBUG
|
#ifdef UNIV_MEM_DEBUG
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
Prints the contents of a memory heap. */
|
Prints the contents of a memory heap. */
|
||||||
@ -71,7 +69,6 @@ mem_heap_print(
|
|||||||
/*===========*/
|
/*===========*/
|
||||||
mem_heap_t* heap); /* in: memory heap */
|
mem_heap_t* heap); /* in: memory heap */
|
||||||
#endif /* UNIV_MEM_DEBUG */
|
#endif /* UNIV_MEM_DEBUG */
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
Checks that an object is a memory heap (or a block of it) */
|
Checks that an object is a memory heap (or a block of it) */
|
||||||
|
|
||||||
@ -88,7 +85,6 @@ mem_heap_validate(
|
|||||||
/*==============*/
|
/*==============*/
|
||||||
/* out: TRUE if ok */
|
/* out: TRUE if ok */
|
||||||
mem_heap_t* heap); /* in: memory heap */
|
mem_heap_t* heap); /* in: memory heap */
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
#ifdef UNIV_MEM_DEBUG
|
#ifdef UNIV_MEM_DEBUG
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
TRUE if no memory is currently allocated. */
|
TRUE if no memory is currently allocated. */
|
||||||
|
@ -56,7 +56,6 @@ mem_hash_insert(
|
|||||||
mem_heap_t* heap, /* in: the created heap */
|
mem_heap_t* heap, /* in: the created heap */
|
||||||
char* file_name, /* in: file name of creation */
|
char* file_name, /* in: file name of creation */
|
||||||
ulint line); /* in: line where created */
|
ulint line); /* in: line where created */
|
||||||
#ifdef UNIV_MEM_DEBUG
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
Removes a memory heap (which is going to be freed by the caller)
|
Removes a memory heap (which is going to be freed by the caller)
|
||||||
from the list of live memory heaps. Returns the size of the heap
|
from the list of live memory heaps. Returns the size of the heap
|
||||||
@ -72,7 +71,7 @@ mem_hash_remove(
|
|||||||
mem_heap_t* heap, /* in: the heap to be freed */
|
mem_heap_t* heap, /* in: the heap to be freed */
|
||||||
char* file_name, /* in: file name of freeing */
|
char* file_name, /* in: file name of freeing */
|
||||||
ulint line); /* in: line where freed */
|
ulint line); /* in: line where freed */
|
||||||
#endif /* UNIV_MEM_DEBUG */
|
|
||||||
|
|
||||||
void
|
void
|
||||||
mem_field_header_set_len(byte* field, ulint len);
|
mem_field_header_set_len(byte* field, ulint len);
|
||||||
|
@ -83,7 +83,6 @@ Releases the mem pool mutex. */
|
|||||||
void
|
void
|
||||||
mem_pool_mutex_exit(void);
|
mem_pool_mutex_exit(void);
|
||||||
/*=====================*/
|
/*=====================*/
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Validates a memory pool. */
|
Validates a memory pool. */
|
||||||
|
|
||||||
@ -100,7 +99,7 @@ mem_pool_print_info(
|
|||||||
/*================*/
|
/*================*/
|
||||||
FILE* outfile,/* in: output file to write to */
|
FILE* outfile,/* in: output file to write to */
|
||||||
mem_pool_t* pool); /* in: memory pool */
|
mem_pool_t* pool); /* in: memory pool */
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
#ifndef UNIV_NONINL
|
#ifndef UNIV_NONINL
|
||||||
#include "mem0pool.ic"
|
#include "mem0pool.ic"
|
||||||
|
@ -240,7 +240,6 @@ mtr_memo_contains(
|
|||||||
mtr_t* mtr, /* in: mtr */
|
mtr_t* mtr, /* in: mtr */
|
||||||
void* object, /* in: object to search */
|
void* object, /* in: object to search */
|
||||||
ulint type); /* in: type of object */
|
ulint type); /* in: type of object */
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
Prints info of an mtr handle. */
|
Prints info of an mtr handle. */
|
||||||
|
|
||||||
@ -248,7 +247,6 @@ void
|
|||||||
mtr_print(
|
mtr_print(
|
||||||
/*======*/
|
/*======*/
|
||||||
mtr_t* mtr); /* in: mtr */
|
mtr_t* mtr); /* in: mtr */
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
/*######################################################################*/
|
/*######################################################################*/
|
||||||
|
|
||||||
#define MTR_BUF_MEMO_SIZE 200 /* number of slots in memo */
|
#define MTR_BUF_MEMO_SIZE 200 /* number of slots in memo */
|
||||||
|
@ -43,7 +43,6 @@ opt_find_all_cols(
|
|||||||
to add new found columns */
|
to add new found columns */
|
||||||
plan_t* plan, /* in: plan or NULL */
|
plan_t* plan, /* in: plan or NULL */
|
||||||
que_node_t* exp); /* in: expression or condition */
|
que_node_t* exp); /* in: expression or condition */
|
||||||
#ifdef UNIV_SQL_DEBUG
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Prints info of a query plan. */
|
Prints info of a query plan. */
|
||||||
|
|
||||||
@ -51,7 +50,6 @@ void
|
|||||||
opt_print_query_plan(
|
opt_print_query_plan(
|
||||||
/*=================*/
|
/*=================*/
|
||||||
sel_node_t* sel_node); /* in: select node */
|
sel_node_t* sel_node); /* in: select node */
|
||||||
#endif /* UNIV_SQL_DEBUG */
|
|
||||||
|
|
||||||
#ifndef UNIV_NONINL
|
#ifndef UNIV_NONINL
|
||||||
#include "pars0opt.ic"
|
#include "pars0opt.ic"
|
||||||
|
@ -85,7 +85,6 @@ void
|
|||||||
rw_lock_free(
|
rw_lock_free(
|
||||||
/*=========*/
|
/*=========*/
|
||||||
rw_lock_t* lock); /* in: rw-lock */
|
rw_lock_t* lock); /* in: rw-lock */
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Checks that the rw-lock has been initialized and that there are no
|
Checks that the rw-lock has been initialized and that there are no
|
||||||
simultaneous shared and exclusive locks. */
|
simultaneous shared and exclusive locks. */
|
||||||
@ -94,7 +93,6 @@ ibool
|
|||||||
rw_lock_validate(
|
rw_lock_validate(
|
||||||
/*=============*/
|
/*=============*/
|
||||||
rw_lock_t* lock);
|
rw_lock_t* lock);
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
NOTE! The following macros should be used in rw s-locking, not the
|
NOTE! The following macros should be used in rw s-locking, not the
|
||||||
corresponding function. */
|
corresponding function. */
|
||||||
|
@ -143,7 +143,6 @@ void
|
|||||||
sync_print(
|
sync_print(
|
||||||
/*=======*/
|
/*=======*/
|
||||||
FILE* file); /* in: file where to print */
|
FILE* file); /* in: file where to print */
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Checks that the mutex has been initialized. */
|
Checks that the mutex has been initialized. */
|
||||||
|
|
||||||
@ -151,7 +150,6 @@ ibool
|
|||||||
mutex_validate(
|
mutex_validate(
|
||||||
/*===========*/
|
/*===========*/
|
||||||
mutex_t* mutex);
|
mutex_t* mutex);
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Sets the mutex latching level field. */
|
Sets the mutex latching level field. */
|
||||||
|
|
||||||
|
@ -292,9 +292,7 @@ waiting, in its lock queue. Solution: We can copy the locks as gap type
|
|||||||
locks, so that also the waiting locks are transformed to granted gap type
|
locks, so that also the waiting locks are transformed to granted gap type
|
||||||
locks on the inserted record. */
|
locks on the inserted record. */
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
ibool lock_print_waits = FALSE;
|
ibool lock_print_waits = FALSE;
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/* The lock system */
|
/* The lock system */
|
||||||
lock_sys_t* lock_sys = NULL;
|
lock_sys_t* lock_sys = NULL;
|
||||||
@ -1354,8 +1352,7 @@ lock_rec_has_expl(
|
|||||||
|
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Checks if some other transaction has a lock request in the queue. */
|
Checks if some other transaction has a lock request in the queue. */
|
||||||
static
|
static
|
||||||
@ -1398,7 +1395,6 @@ lock_rec_other_has_expl_req(
|
|||||||
|
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Checks if some other transaction has a conflicting explicit lock request
|
Checks if some other transaction has a conflicting explicit lock request
|
||||||
@ -1688,13 +1684,11 @@ lock_rec_enqueue_waiting(
|
|||||||
|
|
||||||
ut_a(que_thr_stop(thr));
|
ut_a(que_thr_stop(thr));
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (lock_print_waits) {
|
if (lock_print_waits) {
|
||||||
fprintf(stderr, "Lock wait for trx %lu in index ",
|
fprintf(stderr, "Lock wait for trx %lu in index ",
|
||||||
ut_dulint_get_low(trx->id));
|
ut_dulint_get_low(trx->id));
|
||||||
ut_print_name(stderr, index->name);
|
ut_print_name(stderr, index->name);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
return(DB_LOCK_WAIT);
|
return(DB_LOCK_WAIT);
|
||||||
}
|
}
|
||||||
@ -2034,12 +2028,10 @@ lock_grant(
|
|||||||
lock->trx->n_tables_locked++;
|
lock->trx->n_tables_locked++;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (lock_print_waits) {
|
if (lock_print_waits) {
|
||||||
fprintf(stderr, "Lock wait for trx %lu ends\n",
|
fprintf(stderr, "Lock wait for trx %lu ends\n",
|
||||||
ut_dulint_get_low(lock->trx->id));
|
ut_dulint_get_low(lock->trx->id));
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/* If we are resolving a deadlock by choosing another transaction
|
/* If we are resolving a deadlock by choosing another transaction
|
||||||
as a victim, then our original transaction may not be in the
|
as a victim, then our original transaction may not be in the
|
||||||
@ -3110,11 +3102,9 @@ lock_deadlock_recursive(
|
|||||||
lock_table_print(ef, start->wait_lock);
|
lock_table_print(ef, start->wait_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (lock_print_waits) {
|
if (lock_print_waits) {
|
||||||
fputs("Deadlock detected\n", stderr);
|
fputs("Deadlock detected\n", stderr);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
if (ut_dulint_cmp(wait_lock->trx->undo_no,
|
if (ut_dulint_cmp(wait_lock->trx->undo_no,
|
||||||
start->undo_no) >= 0) {
|
start->undo_no) >= 0) {
|
||||||
@ -4174,7 +4164,6 @@ loop:
|
|||||||
goto loop;
|
goto loop;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Validates the lock queue on a table. */
|
Validates the lock queue on a table. */
|
||||||
|
|
||||||
@ -4485,7 +4474,6 @@ lock_validate(void)
|
|||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/*============ RECORD LOCK CHECKS FOR ROW OPERATIONS ====================*/
|
/*============ RECORD LOCK CHECKS FOR ROW OPERATIONS ====================*/
|
||||||
|
|
||||||
|
@ -375,7 +375,6 @@ mem_hash_remove(
|
|||||||
}
|
}
|
||||||
#endif /* UNIV_MEM_DEBUG */
|
#endif /* UNIV_MEM_DEBUG */
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
Checks a memory heap for consistency and prints the contents if requested.
|
Checks a memory heap for consistency and prints the contents if requested.
|
||||||
Outputs the sum of sizes of buffers given to the user (only in
|
Outputs the sum of sizes of buffers given to the user (only in
|
||||||
@ -586,7 +585,6 @@ mem_heap_validate(
|
|||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
#ifdef UNIV_MEM_DEBUG
|
#ifdef UNIV_MEM_DEBUG
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
|
@ -558,7 +558,6 @@ mem_area_free(
|
|||||||
ut_ad(mem_pool_validate(pool));
|
ut_ad(mem_pool_validate(pool));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Validates a memory pool. */
|
Validates a memory pool. */
|
||||||
|
|
||||||
@ -636,7 +635,6 @@ mem_pool_print_info(
|
|||||||
pool->reserved);
|
pool->reserved);
|
||||||
mutex_exit(&(pool->mutex));
|
mutex_exit(&(pool->mutex));
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Returns the amount of reserved memory. */
|
Returns the amount of reserved memory. */
|
||||||
|
@ -319,7 +319,6 @@ mtr_read_dulint(
|
|||||||
return(mach_read_from_8(ptr));
|
return(mach_read_from_8(ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
Prints info of an mtr handle. */
|
Prints info of an mtr handle. */
|
||||||
|
|
||||||
@ -333,4 +332,3 @@ mtr_print(
|
|||||||
dyn_array_get_data_size(&(mtr->memo)),
|
dyn_array_get_data_size(&(mtr->memo)),
|
||||||
dyn_array_get_data_size(&(mtr->log)));
|
dyn_array_get_data_size(&(mtr->log)));
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
@ -1190,7 +1190,6 @@ opt_search_plan(
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_SQL_DEBUG
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Prints info of a query plan. */
|
Prints info of a query plan. */
|
||||||
|
|
||||||
@ -1236,4 +1235,3 @@ opt_print_query_plan(
|
|||||||
UT_LIST_GET_LEN(plan->end_conds));
|
UT_LIST_GET_LEN(plan->end_conds));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* UNIV_SQL_DEBUG */
|
|
||||||
|
@ -1349,9 +1349,7 @@ NetWare. */
|
|||||||
|
|
||||||
os_thread_create(&srv_master_thread, NULL, thread_ids + 1 +
|
os_thread_create(&srv_master_thread, NULL, thread_ids + 1 +
|
||||||
SRV_MAX_N_IO_THREADS);
|
SRV_MAX_N_IO_THREADS);
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/* buf_debug_prints = TRUE; */
|
/* buf_debug_prints = TRUE; */
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
sum_of_data_file_sizes = 0;
|
sum_of_data_file_sizes = 0;
|
||||||
|
|
||||||
|
@ -157,7 +157,6 @@ rw_lock_free(
|
|||||||
mutex_exit(&rw_lock_list_mutex);
|
mutex_exit(&rw_lock_list_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Checks that the rw-lock has been initialized and that there are no
|
Checks that the rw-lock has been initialized and that there are no
|
||||||
simultaneous shared and exclusive locks. */
|
simultaneous shared and exclusive locks. */
|
||||||
@ -185,7 +184,6 @@ rw_lock_validate(
|
|||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Lock an rw-lock in shared mode for the current thread. If the rw-lock is
|
Lock an rw-lock in shared mode for the current thread. If the rw-lock is
|
||||||
|
@ -299,7 +299,6 @@ mutex_enter_nowait(
|
|||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Checks that the mutex has been initialized. */
|
Checks that the mutex has been initialized. */
|
||||||
|
|
||||||
@ -313,7 +312,6 @@ mutex_validate(
|
|||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Sets the waiters field in a mutex. */
|
Sets the waiters field in a mutex. */
|
||||||
@ -1060,12 +1058,8 @@ sync_thread_add_level(
|
|||||||
} else if (level == SYNC_DICT_HEADER) {
|
} else if (level == SYNC_DICT_HEADER) {
|
||||||
ut_a(sync_thread_levels_g(array, SYNC_DICT_HEADER));
|
ut_a(sync_thread_levels_g(array, SYNC_DICT_HEADER));
|
||||||
} else if (level == SYNC_DICT) {
|
} else if (level == SYNC_DICT) {
|
||||||
#ifdef UNIV_DEBUG
|
ut_a(buf_debug_prints
|
||||||
ut_a(buf_debug_prints ||
|
|| sync_thread_levels_g(array, SYNC_DICT));
|
||||||
sync_thread_levels_g(array, SYNC_DICT));
|
|
||||||
#else /* UNIV_DEBUG */
|
|
||||||
ut_a(sync_thread_levels_g(array, SYNC_DICT));
|
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
} else {
|
} else {
|
||||||
ut_error;
|
ut_error;
|
||||||
}
|
}
|
||||||
|
@ -1114,12 +1114,10 @@ trx_finish_rollback_off_kernel(
|
|||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
|
||||||
if (lock_print_waits) {
|
if (lock_print_waits) {
|
||||||
fprintf(stderr, "Trx %lu rollback finished\n",
|
fprintf(stderr, "Trx %lu rollback finished\n",
|
||||||
ut_dulint_get_low(trx->id));
|
ut_dulint_get_low(trx->id));
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
|
||||||
|
|
||||||
trx_commit_off_kernel(trx);
|
trx_commit_off_kernel(trx);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user