summaryrefslogtreecommitdiff
path: root/innobase/fsp/fsp0fsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/fsp/fsp0fsp.c')
-rw-r--r--innobase/fsp/fsp0fsp.c50
1 files changed, 46 insertions, 4 deletions
diff --git a/innobase/fsp/fsp0fsp.c b/innobase/fsp/fsp0fsp.c
index ee48288b875..20bf4972f64 100644
--- a/innobase/fsp/fsp0fsp.c
+++ b/innobase/fsp/fsp0fsp.c
@@ -778,7 +778,7 @@ fsp_init_file_page_low(
page[i] = 0xFF;
}
#endif
- mach_write_to_8(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN,
+ mach_write_to_8(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM,
ut_dulint_zero);
mach_write_to_8(page + FIL_PAGE_LSN, ut_dulint_zero);
}
@@ -2709,10 +2709,52 @@ fseg_free_page_low(
return;
}
+/*
+ fprintf(stderr,
+"InnoDB: InnoDB is freeing space %lu page %lu,\n"
+"InnoDB: which belongs to descr seg %lu %lu\n"
+"InnoDB: segment %lu %lu.\n",
+ space, page,
+ ut_dulint_get_high(
+ mtr_read_dulint(descr + XDES_ID, MLOG_8BYTES, mtr)),
+ ut_dulint_get_low(
+ mtr_read_dulint(descr + XDES_ID, MLOG_8BYTES, mtr)),
+ ut_dulint_get_high(
+ mtr_read_dulint(seg_inode + FSEG_ID, MLOG_8BYTES, mtr)),
+ ut_dulint_get_low(
+ mtr_read_dulint(seg_inode + FSEG_ID, MLOG_8BYTES, mtr)));
+*/
/* If we get here, the page is in some extent of the segment */
- ut_a(0 == ut_dulint_cmp(
+ if (0 != ut_dulint_cmp(
mtr_read_dulint(descr + XDES_ID, MLOG_8BYTES, mtr),
- mtr_read_dulint(seg_inode + FSEG_ID, MLOG_8BYTES, mtr)));
+ mtr_read_dulint(seg_inode + FSEG_ID, MLOG_8BYTES, mtr))) {
+
+ ut_sprintf_buf(errbuf, descr, 40);
+ fprintf(stderr,
+"InnoDB: Dump of the tablespace extent descriptor: %s\n", errbuf);
+ ut_sprintf_buf(errbuf, seg_inode, 40);
+ fprintf(stderr,
+"InnoDB: Dump of the segment inode: %s\n", errbuf);
+
+ fprintf(stderr,
+"InnoDB: Serious error: InnoDB is trying to free space %lu page %lu,\n"
+"InnoDB: which does not belong to segment %lu %lu but belongs\n"
+"InnoDB: to segment %lu %lu.\n",
+ space, page,
+ ut_dulint_get_high(
+ mtr_read_dulint(descr + XDES_ID, MLOG_8BYTES, mtr)),
+ ut_dulint_get_low(
+ mtr_read_dulint(descr + XDES_ID, MLOG_8BYTES, mtr)),
+ ut_dulint_get_high(
+ mtr_read_dulint(seg_inode + FSEG_ID, MLOG_8BYTES, mtr)),
+ ut_dulint_get_low(
+ mtr_read_dulint(seg_inode + FSEG_ID, MLOG_8BYTES, mtr)));
+
+ fprintf(stderr,
+"InnoDB: If the InnoDB recovery crashes here, see section 6.1\n"
+"InnoDB: of http://www.innodb.com/ibman.html about forcing recovery.\n");
+ ut_a(0);
+ }
not_full_n_used = mtr_read_ulint(seg_inode + FSEG_NOT_FULL_N_USED,
MLOG_4BYTES, mtr);
@@ -2875,7 +2917,7 @@ fseg_free_step(
freed yet */
ut_a(descr);
- ut_a(xdes_get_bit(descr, XDES_FREE_BIT, buf_frame_get_page_no(header)
+ ut_anp(xdes_get_bit(descr, XDES_FREE_BIT, buf_frame_get_page_no(header)
% FSP_EXTENT_SIZE, mtr) == FALSE);
inode = fseg_inode_get(header, mtr);