mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
univ.i, page0page.ic:
Add a sanity check to page_rec_is_comp; a new univ.i macro UNIV_RELEASE_NOT_YET_STABLE controls such sanity checks that we will remove after the release is stable enough innobase/include/page0page.ic: Add a sanity check to page_rec_is_comp; a new univ.i macro UNIV_RELEASE_NOT_YET_STABLE controls such sanity checks that we will remove after the release is stable enough innobase/include/univ.i: Add a sanity check to page_rec_is_comp; a new univ.i macro UNIV_RELEASE_NOT_YET_STABLE controls such sanity checks that we will remove after the release is stable enough
This commit is contained in:
parent
80ea9db87b
commit
8b2b0e2418
2 changed files with 17 additions and 0 deletions
|
@ -175,6 +175,19 @@ page_rec_is_comp(
|
|||
/* out: nonzero if in compact format */
|
||||
const rec_t* rec) /* in: record */
|
||||
{
|
||||
#ifdef UNIV_RELEASE_NOT_YET_STABLE
|
||||
if (UNIV_UNLIKELY((ulint)rec < (ulint)(buf_pool->frame_zero))
|
||||
|| UNIV_UNLIKELY((ulint)rec >= (ulint)(buf_pool->high_end))) {
|
||||
|
||||
ut_print_timestamp(stderr);
|
||||
fprintf(stderr,
|
||||
"InnoDB: Error: trying to read a stray page rec %p\n"
|
||||
"InnoDB: buf pool start is at %p, end at %p\n",
|
||||
rec, buf_pool->frame_zero,
|
||||
buf_pool->high_end);
|
||||
ut_error;
|
||||
}
|
||||
#endif
|
||||
return(page_is_comp(ut_align_down((rec_t*) rec, UNIV_PAGE_SIZE)));
|
||||
}
|
||||
|
||||
|
|
|
@ -80,6 +80,10 @@ memory is read outside the allocated blocks. */
|
|||
|
||||
/* Make a non-inline debug version */
|
||||
|
||||
/* You can remove this define when the release is stable. This define adds
|
||||
some consistency checks to code. They use a little CPU time. */
|
||||
#define UNIV_RELEASE_NOT_YET_STABLE
|
||||
|
||||
/*
|
||||
#define UNIV_DEBUG
|
||||
#define UNIV_MEM_DEBUG
|
||||
|
|
Loading…
Reference in a new issue