Commit e803e137 authored by marko's avatar marko

branches/zip: Make ibuf_validate_low() static and enclose in #ifdef UNIV_DEBUG.

parent 03bdaaf5
...@@ -209,14 +209,15 @@ because ibuf merge is done to a page when it is read in, and it is ...@@ -209,14 +209,15 @@ 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
inside an insert buffer routine. */ inside an insert buffer routine. */
...@@ -3535,10 +3536,10 @@ leave_loop: ...@@ -3535,10 +3536,10 @@ leave_loop:
mem_heap_free(heap); mem_heap_free(heap);
} }
#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)
/*===================*/ /*===================*/
...@@ -3547,9 +3548,9 @@ ibuf_validate_low(void) ...@@ -3547,9 +3548,9 @@ ibuf_validate_low(void)
ibuf_data_t* data; ibuf_data_t* data;
ulint sum_sizes; ulint sum_sizes;
#ifdef UNIV_SYNC_DEBUG # ifdef UNIV_SYNC_DEBUG
ut_ad(mutex_own(&ibuf_mutex)); ut_ad(mutex_own(&ibuf_mutex));
#endif /* UNIV_SYNC_DEBUG */ # endif /* UNIV_SYNC_DEBUG */
sum_sizes = 0; sum_sizes = 0;
...@@ -3565,6 +3566,7 @@ ibuf_validate_low(void) ...@@ -3565,6 +3566,7 @@ ibuf_validate_low(void)
return(TRUE); return(TRUE);
} }
#endif /* UNIV_DEBUG */
/********************************************************************** /**********************************************************************
Looks if the insert buffer is empty. */ Looks if the insert buffer is empty. */
......
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