mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
Merge r328 from branches/5.0:
Remove UNIV_RELEASE_NOT_YET_STABLE and related checks. page_rec_is_comp(): Remove the bounds check. row_sel_field_store_in_mysql_format(): Turn the assertions on mbminlen, mbmaxlen and templ->type into debug assertions.
This commit is contained in:
parent
fc82d3349e
commit
2a574b90b3
3 changed files with 5 additions and 26 deletions
|
@ -175,19 +175,6 @@ 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,10 +80,6 @@ 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
|
||||
|
|
|
@ -2397,18 +2397,16 @@ row_sel_field_store_in_mysql_format(
|
|||
} else if (templ->type == DATA_MYSQL) {
|
||||
memcpy(dest, data, len);
|
||||
|
||||
#if defined(UNIV_RELEASE_NOT_YET_STABLE) || defined(UNIV_DEBUG)
|
||||
ut_a(templ->mysql_col_len >= len);
|
||||
ut_a(templ->mbmaxlen >= templ->mbminlen);
|
||||
ut_ad(templ->mysql_col_len >= len);
|
||||
ut_ad(templ->mbmaxlen >= templ->mbminlen);
|
||||
|
||||
ut_a(templ->mbmaxlen > templ->mbminlen
|
||||
ut_ad(templ->mbmaxlen > templ->mbminlen
|
||||
|| templ->mysql_col_len == len);
|
||||
ut_a(len * templ->mbmaxlen >= templ->mysql_col_len);
|
||||
#endif /* UNIV_RELEASE_NOT_YET_STABLE || UNIV_DEBUG */
|
||||
/* The following assertion would fail for old tables
|
||||
containing UTF-8 ENUM columns due to Bug #9526. */
|
||||
ut_ad(!templ->mbmaxlen
|
||||
|| !(templ->mysql_col_len % templ->mbmaxlen));
|
||||
ut_ad(len * templ->mbmaxlen >= templ->mysql_col_len);
|
||||
|
||||
if (templ->mbminlen != templ->mbmaxlen) {
|
||||
/* Pad with spaces. This undoes the stripping
|
||||
|
@ -2418,15 +2416,13 @@ row_sel_field_store_in_mysql_format(
|
|||
memset(dest + len, 0x20, templ->mysql_col_len - len);
|
||||
}
|
||||
} else {
|
||||
#if defined(UNIV_RELEASE_NOT_YET_STABLE) || defined(UNIV_DEBUG)
|
||||
ut_a(templ->type == DATA_CHAR
|
||||
ut_ad(templ->type == DATA_CHAR
|
||||
|| templ->type == DATA_FIXBINARY
|
||||
/*|| templ->type == DATA_SYS_CHILD
|
||||
|| templ->type == DATA_SYS*/
|
||||
|| templ->type == DATA_FLOAT
|
||||
|| templ->type == DATA_DOUBLE
|
||||
|| templ->type == DATA_DECIMAL);
|
||||
#endif /* UNIV_RELEASE_NOT_YET_STABLE || UNIV_DEBUG */
|
||||
ut_ad(templ->mysql_col_len == len);
|
||||
|
||||
memcpy(dest, data, len);
|
||||
|
|
Loading…
Reference in a new issue