30 #include "page0page.ic"
38 #ifndef UNIV_HOTBACKUP
97 register uint16 rec_offs_bytes;
98 register const page_dir_slot_t* slot;
99 register const page_dir_slot_t* first_slot;
100 register const rec_t* r =
rec;
105 first_slot = page_dir_get_nth_slot(page, 0);
111 ut_ad(r >= page + PAGE_NEW_SUPREMUM);
112 ut_ad(r < page + (UNIV_PAGE_SIZE - PAGE_DIR));
117 ut_ad(r >= page + PAGE_OLD_SUPREMUM);
118 ut_ad(r < page + (UNIV_PAGE_SIZE - PAGE_DIR));
124 while (UNIV_LIKELY(*(uint16*) slot != rec_offs_bytes)) {
126 if (UNIV_UNLIKELY(slot == first_slot)) {
128 "InnoDB: Probable data corruption on"
130 "InnoDB: Original record ",
134 fputs(
"(compact record)", stderr);
140 "InnoDB: on that page.\n"
141 "InnoDB: Cannot find the dir slot for record ",
144 fputs(
"(compact record)", stderr);
150 "InnoDB: on that page!\n", stderr);
157 slot += PAGE_DIR_SLOT_SIZE;
160 return(((ulint) (first_slot - slot)) / PAGE_DIR_SLOT_SIZE);
170 const page_dir_slot_t* slot)
182 ut_a(slot <= page_dir_get_nth_slot(page, 0));
183 ut_a(slot >= page_dir_get_nth_slot(page, n_slots - 1));
193 if (slot == page_dir_get_nth_slot(page, 0)) {
195 }
else if (slot == page_dir_get_nth_slot(page, n_slots - 1)) {
197 ut_a(n_owned <= PAGE_DIR_SLOT_MAX_N_OWNED);
199 ut_a(n_owned >= PAGE_DIR_SLOT_MIN_N_OWNED);
200 ut_a(n_owned <= PAGE_DIR_SLOT_MAX_N_OWNED);
217 page_t* page = buf_block_get_frame(block);
218 #ifndef UNIV_HOTBACKUP
219 ut_ad(!mtr || mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
229 page + (PAGE_HEADER + PAGE_MAX_TRX_ID),
231 #ifndef UNIV_HOTBACKUP
260 ut_ad(page && heap_no);
264 if (avl_space >= need) {
279 #ifndef UNIV_HOTBACKUP
296 # define page_create_write_log(frame,mtr,comp) ((void) 0)
307 byte* end_ptr __attribute__((unused)),
312 ut_ad(ptr && end_ptr);
334 page_dir_slot_t* slot;
346 #if PAGE_BTR_IBUF_FREE_LIST + FLST_BASE_NODE_SIZE > PAGE_DATA
347 # error "PAGE_BTR_IBUF_FREE_LIST + FLST_BASE_NODE_SIZE > PAGE_DATA"
349 #if PAGE_BTR_IBUF_FREE_LIST_NODE + FLST_NODE_SIZE > PAGE_DATA
350 # error "PAGE_BTR_IBUF_FREE_LIST_NODE + FLST_NODE_SIZE > PAGE_DATA"
354 if (UNIV_LIKELY(comp)) {
363 page = buf_block_get_frame(block);
374 field = dtuple_get_nth_field(tuple, 0);
378 DATA_VARCHAR, DATA_ENGLISH | DATA_NOT_NULL, 8);
382 heap_top = page + PAGE_DATA;
386 if (UNIV_LIKELY(comp)) {
387 ut_a(infimum_rec == page + PAGE_NEW_INFIMUM);
392 ut_a(infimum_rec == page + PAGE_OLD_INFIMUM);
398 offsets = rec_get_offsets(infimum_rec, index, NULL,
399 ULINT_UNDEFINED, &heap);
401 heap_top = rec_get_end(infimum_rec, offsets);
407 field = dtuple_get_nth_field(tuple, 0);
411 DATA_VARCHAR, DATA_ENGLISH | DATA_NOT_NULL, comp ? 8 : 9);
415 if (UNIV_LIKELY(comp)) {
416 ut_a(supremum_rec == page + PAGE_NEW_SUPREMUM);
421 ut_a(supremum_rec == page + PAGE_OLD_SUPREMUM);
427 offsets = rec_get_offsets(supremum_rec, index, offsets,
428 ULINT_UNDEFINED, &heap);
429 heap_top = rec_get_end(supremum_rec, offsets);
431 ut_ad(heap_top == page
432 + (comp ? PAGE_NEW_SUPREMUM_END : PAGE_OLD_SUPREMUM_END));
441 ? 0x8000 | PAGE_HEAP_NO_USER_LOW
442 : PAGE_HEAP_NO_USER_LOW);
450 memset(heap_top, 0, UNIV_PAGE_SIZE - PAGE_EMPTY_DIR_START
457 slot = page_dir_get_nth_slot(page, 0);
460 slot = page_dir_get_nth_slot(page, 1);
465 if (UNIV_LIKELY(comp)) {
489 return(page_create_low(block, comp));
514 page = page_create_low(block, TRUE);
519 page_zip_level, mtr)) {
539 const page_t* page = buf_block_get_frame(block);
558 block, page_zip, max_trx_id, mtr);
581 page_t* new_page = buf_block_get_frame(new_block);
585 ulint offsets_[REC_OFFS_NORMAL_SIZE];
586 ulint* offsets = offsets_;
587 rec_offs_init(offsets_);
599 (
page_is_comp(new_page) ? PAGE_NEW_INFIMUM : PAGE_OLD_INFIMUM));
601 cur2 = page_get_infimum_rec(buf_block_get_frame(new_block));
606 rec_t* cur1_rec = page_cur_get_rec(&cur1);
608 offsets = rec_get_offsets(cur1_rec, index, offsets,
609 ULINT_UNDEFINED, &heap);
611 cur1_rec, offsets, mtr);
612 if (UNIV_UNLIKELY(!ins_rec)) {
623 "InnoDB: rec offset %lu, cur1 offset %lu,"
624 " cur2 offset %lu\n",
635 if (UNIV_LIKELY_NULL(heap)) {
640 #ifndef UNIV_HOTBACKUP
663 page_t* new_page = buf_block_get_frame(new_block);
667 page_get_infimum_rec(new_page));
670 #ifdef UNIV_ZIP_DEBUG
679 ut_a(page_zip_validate_low(page_zip, page, index, TRUE));
682 ut_ad(buf_block_get_frame(block) == page);
712 index, page_zip_level, mtr)) {
726 btr_blob_dbg_remove(new_page, index,
727 "copy_end_reorg_fail");
733 btr_blob_dbg_add(new_page, index,
734 "copy_end_reorg_fail");
739 ret = new_page + PAGE_NEW_INFIMUM;
779 page_t* new_page = buf_block_get_frame(new_block);
787 ulint offsets_[REC_OFFS_NORMAL_SIZE];
788 ulint* offsets = offsets_;
789 rec_offs_init(offsets_);
810 while (page_cur_get_rec(&cur1) != rec) {
811 rec_t* cur1_rec = page_cur_get_rec(&cur1);
812 offsets = rec_get_offsets(cur1_rec, index, offsets,
813 ULINT_UNDEFINED, &heap);
815 cur1_rec, offsets, mtr);
821 if (UNIV_LIKELY_NULL(heap)) {
838 DBUG_EXECUTE_IF(
"page_copy_rec_list_start_compress_fail",
839 goto zip_reorganize;);
842 page_zip_level, mtr)) {
860 btr_blob_dbg_remove(new_page, index,
861 "copy_start_reorg_fail");
868 btr_blob_dbg_add(new_page, index,
869 "copy_start_reorg_fail");
913 # define page_delete_rec_list_write_log(rec,index,type,mtr) ((void) 0)
943 if (end_ptr < ptr + 2) {
956 page = buf_block_get_frame(block);
963 ULINT_UNDEFINED, ULINT_UNDEFINED,
989 page_dir_slot_t*slot;
997 ulint offsets_[REC_OFFS_NORMAL_SIZE];
998 ulint* offsets = offsets_;
999 rec_offs_init(offsets_);
1001 ut_ad(size == ULINT_UNDEFINED || size < UNIV_PAGE_SIZE);
1003 #ifdef UNIV_ZIP_DEBUG
1004 ut_a(!page_zip || page_zip_validate(page_zip, page, index));
1008 ut_ad(n_recs == 0 || n_recs == ULINT_UNDEFINED);
1067 offsets = rec_get_offsets(rec, index, offsets,
1068 ULINT_UNDEFINED, &heap);
1070 #ifdef UNIV_ZIP_DEBUG
1071 ut_a(page_zip_validate(page_zip, page, index));
1076 if (UNIV_LIKELY_NULL(heap)) {
1090 if ((size == ULINT_UNDEFINED) || (n_recs == ULINT_UNDEFINED)) {
1098 offsets = rec_get_offsets(rec2, index, offsets,
1099 ULINT_UNDEFINED, &heap);
1103 ut_ad(size + s < UNIV_PAGE_SIZE);
1110 if (UNIV_LIKELY_NULL(heap)) {
1115 ut_ad(size < UNIV_PAGE_SIZE);
1135 ut_ad(slot_index > 0);
1136 slot = page_dir_get_nth_slot(page, slot_index);
1151 ut_ad(slot_index > 0);
1152 slot = page_dir_get_nth_slot(page, slot_index);
1163 btr_blob_dbg_op(page, rec, index,
"delete_end",
1164 btr_blob_dbg_remove_rec);
1192 ulint offsets_[REC_OFFS_NORMAL_SIZE];
1193 ulint* offsets = offsets_;
1197 rec_offs_init(offsets_);
1201 #ifdef UNIV_ZIP_DEBUG
1204 page_t* page = buf_block_get_frame(block);
1212 || page_zip_validate_low(page_zip, page, index, TRUE));
1241 while (page_cur_get_rec(&cur1) != rec) {
1242 offsets = rec_get_offsets(page_cur_get_rec(&cur1), index,
1243 offsets, ULINT_UNDEFINED, &heap);
1247 if (UNIV_LIKELY_NULL(heap)) {
1256 #ifndef UNIV_HOTBACKUP
1278 page_t* new_page = buf_block_get_frame(new_block);
1279 ulint old_data_size;
1280 ulint new_data_size;
1286 #ifdef UNIV_ZIP_DEBUG
1292 ut_a(!new_page_zip == !page_zip);
1294 || page_zip_validate(new_page_zip, new_page, index));
1296 || page_zip_validate(page_zip,
page_align(split_rec),
1302 split_rec, index, mtr))) {
1309 ut_ad(new_data_size >= old_data_size);
1312 new_n_recs - old_n_recs,
1313 new_data_size - old_data_size, mtr);
1339 split_rec, index, mtr))) {
1361 page_dir_slot_t* slot;
1374 slot = page_dir_get_nth_slot(page, slot_no);
1380 slot = page_dir_get_nth_slot(page, slot_no + 1);
1385 for (i = slot_no + 1; i < n_slots; i++) {
1386 rec_t*
rec = (rec_t*)
1411 page_dir_slot_t* slot;
1416 ut_ad(start < n_slots - 1);
1422 slot = page_dir_get_nth_slot(page, n_slots);
1423 memmove(slot, slot + PAGE_DIR_SLOT_SIZE,
1424 (n_slots - 1 - start) * PAGE_DIR_SLOT_SIZE);
1439 page_dir_slot_t* new_slot;
1440 page_dir_slot_t* prev_slot;
1441 page_dir_slot_t* slot;
1449 slot = page_dir_get_nth_slot(page, slot_no);
1452 ut_ad(n_owned == PAGE_DIR_SLOT_MAX_N_OWNED + 1);
1457 prev_slot = page_dir_get_nth_slot(page, slot_no - 1);
1460 for (i = 0; i < n_owned / 2; i++) {
1464 ut_ad(n_owned / 2 >= PAGE_DIR_SLOT_MIN_N_OWNED);
1474 new_slot = page_dir_get_nth_slot(page, slot_no);
1475 slot = page_dir_get_nth_slot(page, slot_no + 1);
1500 page_dir_slot_t* slot;
1501 page_dir_slot_t* up_slot;
1511 slot = page_dir_get_nth_slot(page, slot_no);
1521 up_slot = page_dir_get_nth_slot(page, slot_no + 1);
1526 ut_ad(n_owned == PAGE_DIR_SLOT_MIN_N_OWNED - 1);
1530 ut_ad(2 * PAGE_DIR_SLOT_MIN_N_OWNED - 1 <= PAGE_DIR_SLOT_MAX_N_OWNED);
1532 if (up_n_owned > PAGE_DIR_SLOT_MIN_N_OWNED) {
1570 const page_dir_slot_t* slot;
1576 return(page_get_infimum_rec(page));
1579 ut_ad(nth < UNIV_PAGE_SIZE / (REC_N_NEW_EXTRA_BYTES + 1));
1583 slot = page_dir_get_nth_slot(page, i);
1586 if (n_owned > nth) {
1594 slot = page_dir_get_nth_slot(page, i - 1);
1622 const page_dir_slot_t* slot;
1623 const rec_t* slot_rec;
1638 for (i = 0; ; i++) {
1639 slot = page_dir_get_nth_slot(page, i);
1644 if (rec == slot_rec) {
1656 for (i = 0; ; i++) {
1657 slot = page_dir_get_nth_slot(page, i);
1662 if (rec == slot_rec) {
1672 ut_ad((ulong) n < UNIV_PAGE_SIZE / (REC_N_NEW_EXTRA_BYTES + 1));
1677 #ifndef UNIV_HOTBACKUP
1686 const ulint* offsets)
1692 " n_owned: %lu; heap_no: %lu; next rec: %lu\n",
1698 " n_owned: %lu; heap_no: %lu; next rec: %lu\n",
1708 # ifdef UNIV_BTR_PRINT
1721 page_dir_slot_t* slot;
1725 fprintf(stderr,
"--------------------------------\n"
1728 "Directory stack top at offs: %lu; number of slots: %lu\n",
1729 page, (ulong)
page_offset(page_dir_get_nth_slot(page, n - 1)),
1731 for (i = 0; i <
n; i++) {
1732 slot = page_dir_get_nth_slot(page, i);
1733 if ((i == pr_n) && (i < n - pr_n)) {
1734 fputs(
" ... \n", stderr);
1736 if ((i < pr_n) || (i >= n - pr_n)) {
1738 "Contents of slot: %lu: n_owned: %lu,"
1746 fprintf(stderr,
"Total of %lu records\n"
1747 "--------------------------------\n",
1767 ulint offsets_[REC_OFFS_NORMAL_SIZE];
1768 ulint* offsets = offsets_;
1769 rec_offs_init(offsets_);
1774 "--------------------------------\n"
1775 "PAGE RECORD LIST\n"
1776 "Page address %p\n", page);
1783 offsets = rec_get_offsets(cur.
rec, index, offsets,
1784 ULINT_UNDEFINED, &heap);
1787 if (count == pr_n) {
1797 if (n_recs > 2 * pr_n) {
1798 fputs(
" ... \n", stderr);
1804 if (count + pr_n >= n_recs) {
1805 offsets = rec_get_offsets(cur.
rec, index, offsets,
1806 ULINT_UNDEFINED, &heap);
1813 "Total of %lu records \n"
1814 "--------------------------------\n",
1815 (ulong) (count + 1));
1817 if (UNIV_LIKELY_NULL(heap)) {
1831 "--------------------------------\n"
1832 "PAGE HEADER INFO\n"
1833 "Page address %p, n records %lu (%s)\n"
1834 "n dir slots %lu, heap top %lu\n"
1835 "Page n heap %lu, free %lu, garbage %lu\n"
1836 "Page last insert %lu, direction %lu, n direction %lu\n",
1838 page_is_comp(page) ?
"compact format" :
"original format",
1865 page_header_print(page);
1866 page_dir_print(page, dn);
1867 page_print_list(block, index, rn);
1882 const ulint* offsets)
1902 if (UNIV_UNLIKELY(!(n_owned <= PAGE_DIR_SLOT_MAX_N_OWNED))) {
1904 "InnoDB: Dir slot of rec %lu, n owned too big %lu\n",
1911 "InnoDB: Heap no of rec %lu too big %lu %lu\n",
1920 #ifndef UNIV_HOTBACKUP
1933 ulint supremum_offs;
1943 "InnoDB: Page directory corruption:"
1944 " infimum not pointed to\n");
1951 "InnoDB: Page directory corruption:"
1952 " supremum not pointed to\n");
1969 const page_dir_slot_t* slot;
1973 const byte* rec_heap_top;
1985 if (UNIV_UNLIKELY(n_slots > UNIV_PAGE_SIZE / 4)) {
1987 "InnoDB: Nonsensical number %lu of page dir slots\n",
1995 if (UNIV_UNLIKELY(rec_heap_top
1996 > page_dir_get_nth_slot(page, n_slots - 1))) {
1999 "InnoDB: Record heap and dir overlap on a page,"
2000 " heap top %lu, dir %lu\n",
2003 page_offset(page_dir_get_nth_slot(page, n_slots - 1)));
2014 slot = page_dir_get_nth_slot(page, slot_no);
2016 rec = page_get_infimum_rec(page);
2019 if (UNIV_UNLIKELY(rec > rec_heap_top)) {
2021 "InnoDB: Record %lu is above"
2022 " rec heap top %lu\n",
2023 (ulong)(rec - page),
2024 (ulong)(rec_heap_top - page));
2035 "InnoDB: Wrong owned count %lu, %lu,"
2039 (ulong)(rec - page));
2047 "InnoDB: Dir slot does not point"
2048 " to right rec %lu\n",
2049 (ulong)(rec - page));
2058 slot = page_dir_get_nth_slot(page, slot_no);
2071 "InnoDB: Next record offset"
2072 " nonsensical %lu for rec %lu\n",
2074 (ulong) (rec - page));
2081 if (UNIV_UNLIKELY(count > UNIV_PAGE_SIZE)) {
2083 "InnoDB: Page record list appears"
2084 " to be circular %lu\n",
2094 fprintf(stderr,
"InnoDB: n owned is zero in a supremum rec\n");
2099 if (UNIV_UNLIKELY(slot_no != n_slots - 1)) {
2100 fprintf(stderr,
"InnoDB: n slots wrong %lu, %lu\n",
2101 (ulong) slot_no, (ulong) (n_slots - 1));
2106 + PAGE_HEAP_NO_USER_LOW
2108 fprintf(stderr,
"InnoDB: n recs wrong %lu %lu\n",
2110 + PAGE_HEAP_NO_USER_LOW,
2111 (ulong) (count + 1));
2119 while (rec != NULL) {
2121 || rec >= page + UNIV_PAGE_SIZE)) {
2123 "InnoDB: Free list record has"
2124 " a nonsensical offset %lu\n",
2125 (ulong) (rec - page));
2130 if (UNIV_UNLIKELY(rec > rec_heap_top)) {
2132 "InnoDB: Free list record %lu"
2133 " is above rec heap top %lu\n",
2134 (ulong) (rec - page),
2135 (ulong) (rec_heap_top - page));
2142 if (UNIV_UNLIKELY(count > UNIV_PAGE_SIZE)) {
2144 "InnoDB: Page free list appears"
2145 " to be circular %lu\n",
2155 fprintf(stderr,
"InnoDB: N heap is wrong %lu, %lu\n",
2157 (ulong) (count + 1));
2179 const page_dir_slot_t* slot;
2183 const byte* rec_heap_top;
2195 if (UNIV_UNLIKELY(n_slots > UNIV_PAGE_SIZE / 4)) {
2197 "InnoDB: Nonsensical number %lu"
2198 " of page dir slots\n", (ulong) n_slots);
2205 if (UNIV_UNLIKELY(rec_heap_top
2206 > page_dir_get_nth_slot(page, n_slots - 1))) {
2209 "InnoDB: Record heap and dir overlap on a page,"
2210 " heap top %lu, dir %lu\n",
2213 page_offset(page_dir_get_nth_slot(page, n_slots - 1)));
2224 slot = page_dir_get_nth_slot(page, slot_no);
2226 rec = page_get_infimum_rec(page);
2229 if (UNIV_UNLIKELY(rec > rec_heap_top)) {
2231 "InnoDB: Record %lu is above rec"
2245 "InnoDB: Wrong owned count %lu, %lu,"
2257 "InnoDB: Dir slot does not point"
2258 " to right rec %lu\n",
2268 slot = page_dir_get_nth_slot(page, slot_no);
2281 "InnoDB: Next record offset nonsensical %lu"
2291 if (UNIV_UNLIKELY(count > UNIV_PAGE_SIZE)) {
2293 "InnoDB: Page record list appears"
2294 " to be circular %lu\n",
2304 fprintf(stderr,
"InnoDB: n owned is zero"
2305 " in a supremum rec\n");
2310 if (UNIV_UNLIKELY(slot_no != n_slots - 1)) {
2311 fprintf(stderr,
"InnoDB: n slots wrong %lu, %lu\n",
2312 (ulong) slot_no, (ulong) (n_slots - 1));
2317 + PAGE_HEAP_NO_USER_LOW
2319 fprintf(stderr,
"InnoDB: n recs wrong %lu %lu\n",
2321 + PAGE_HEAP_NO_USER_LOW,
2322 (ulong) (count + 1));
2330 while (rec != NULL) {
2332 || rec >= page + UNIV_PAGE_SIZE)) {
2334 "InnoDB: Free list record has"
2335 " a nonsensical offset %lu\n",
2341 if (UNIV_UNLIKELY(rec > rec_heap_top)) {
2343 "InnoDB: Free list record %lu"
2344 " is above rec heap top %lu\n",
2353 if (UNIV_UNLIKELY(count > UNIV_PAGE_SIZE)) {
2355 "InnoDB: Page free list appears"
2356 " to be circular %lu\n",
2366 fprintf(stderr,
"InnoDB: N heap is wrong %lu, %lu\n",
2368 (ulong) (count + 1));
2390 const page_dir_slot_t* slot;
2395 ulint rec_own_count;
2399 const rec_t* old_rec = NULL;
2404 ulint* offsets = NULL;
2405 ulint* old_offsets = NULL;
2409 fputs(
"InnoDB: 'compact format' flag mismatch\n", stderr);
2427 if (max_trx_id == 0 || max_trx_id > sys_max_trx_id) {
2429 "PAGE_MAX_TRX_ID out of bounds: "
2431 max_trx_id, sys_max_trx_id);
2449 <= page_dir_get_nth_slot(page, n_slots - 1)))) {
2452 "InnoDB: Record heap and dir overlap"
2453 " on space %lu page %lu index %s, %p, %p\n",
2457 page_dir_get_nth_slot(page, n_slots - 1));
2468 slot = page_dir_get_nth_slot(page, slot_no);
2470 rec = page_get_infimum_rec(page);
2473 offsets = rec_get_offsets(rec, index, offsets,
2474 ULINT_UNDEFINED, &heap);
2479 fputs(
"InnoDB: node_ptr flag mismatch\n", stderr);
2487 #ifndef UNIV_HOTBACKUP
2489 if (UNIV_LIKELY(count >= PAGE_HEAP_NO_USER_LOW)
2493 offsets, old_offsets, index))) {
2495 "InnoDB: Records in wrong order"
2496 " on space %lu page %lu index %s\n",
2500 fputs(
"\nInnoDB: previous record ", stderr);
2502 fputs(
"\nInnoDB: record ", stderr);
2518 if (UNIV_UNLIKELY(offs + i >= UNIV_PAGE_SIZE)) {
2519 fputs(
"InnoDB: record offset out of bounds\n", stderr);
2524 if (UNIV_UNLIKELY(buf[offs + i])) {
2527 fputs(
"InnoDB: Record overlaps another\n",
2541 if (UNIV_UNLIKELY(rec_own_count)) {
2543 if (UNIV_UNLIKELY(rec_own_count != own_count)) {
2545 "InnoDB: Wrong owned count %lu, %lu\n",
2546 (ulong) rec_own_count,
2552 fputs(
"InnoDB: Dir slot does not"
2553 " point to right rec\n",
2558 page_dir_slot_check(slot);
2563 slot = page_dir_get_nth_slot(page, slot_no);
2578 ulint* offs = old_offsets;
2591 fputs(
"InnoDB: n owned is zero\n", stderr);
2595 if (UNIV_UNLIKELY(slot_no != n_slots - 1)) {
2596 fprintf(stderr,
"InnoDB: n slots wrong %lu %lu\n",
2597 (ulong) slot_no, (ulong) (n_slots - 1));
2602 + PAGE_HEAP_NO_USER_LOW
2604 fprintf(stderr,
"InnoDB: n recs wrong %lu %lu\n",
2606 + PAGE_HEAP_NO_USER_LOW,
2607 (ulong) (count + 1));
2613 "InnoDB: Summed data size %lu, returned by func %lu\n",
2621 while (rec != NULL) {
2622 offsets = rec_get_offsets(rec, index, offsets,
2623 ULINT_UNDEFINED, &heap);
2632 if (UNIV_UNLIKELY(offs + i >= UNIV_PAGE_SIZE)) {
2633 fputs(
"InnoDB: record offset out of bounds\n", stderr);
2639 if (UNIV_UNLIKELY(buf[offs + i])) {
2640 fputs(
"InnoDB: Record overlaps another"
2641 " in free list\n", stderr);
2652 fprintf(stderr,
"InnoDB: N heap is wrong %lu %lu\n",
2663 if (UNIV_UNLIKELY(ret == FALSE)) {
2666 "InnoDB: Apparent corruption"
2667 " in space %lu page %lu index %s\n",
2677 #ifndef UNIV_HOTBACKUP
2691 rec = page + PAGE_NEW_INFIMUM;
2696 if (rec_heap_no == heap_no) {
2699 }
else if (rec_heap_no == PAGE_HEAP_NO_SUPREMUM) {
2707 rec = page + PAGE_OLD_INFIMUM;
2712 if (rec_heap_no == heap_no) {
2715 }
else if (rec_heap_no == PAGE_HEAP_NO_SUPREMUM) {
2740 const ulint* offsets)
2742 bool no_compress_needed;
2744 page_t* page = buf_block_get_frame(block);
2764 no_compress_needed =
true;
2767 if (no_compress_needed) {
2768 #ifdef UNIV_ZIP_DEBUG
2769 ut_a(!page_zip || page_zip_validate(page_zip, page, index));
2774 #ifdef UNIV_ZIP_DEBUG
2775 ut_a(!page_zip || page_zip_validate(page_zip, page, index));
2779 return(no_compress_needed);