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:
unknown 2005-09-03 19:15:37 +03:00
parent 80ea9db87b
commit 8b2b0e2418
2 changed files with 17 additions and 0 deletions

View file

@ -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)));
}

View file

@ -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