Commit 8b2b0e24 authored by unknown's avatar unknown
Browse files

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
parent 80ea9db8
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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)));
}

+4 −0
Original line number Diff line number Diff line
@@ -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