summaryrefslogtreecommitdiff
path: root/innobase/ibuf
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-02-26 00:22:35 +0200
committerunknown <monty@narttu.mysql.fi>2003-02-26 00:22:35 +0200
commitb9c69c1609ad2590b6c0130c0d3fcc5e7a033e76 (patch)
tree7ab76a019795a4806b97cb19efc02d2efcfaff5e /innobase/ibuf
parent6e2ee18779d86b12d2c61a10fba4a1ced1ac0b8e (diff)
parent21f2382b283e9676f58d61ac744dd744e153239a (diff)
downloadmariadb-git-b9c69c1609ad2590b6c0130c0d3fcc5e7a033e76.tar.gz
merge with 3.23 to get corrected error message files and rename of files in mysql-test
innobase/ibuf/ibuf0ibuf.c: Auto merged sql/share/english/errmsg.txt: Auto merged sql/share/french/errmsg.txt: Auto merged sql/share/german/errmsg.txt: Auto merged sql/share/greek/errmsg.txt: Auto merged sql/share/hungarian/errmsg.txt: Auto merged sql/share/italian/errmsg.txt: Auto merged sql/share/japanese/errmsg.txt: Auto merged sql/share/korean/errmsg.txt: Auto merged sql/share/norwegian-ny/errmsg.txt: Auto merged sql/share/norwegian/errmsg.txt: Auto merged sql/sql_analyse.cc: Auto merged sql/sql_analyse.h: Auto merged sql/share/polish/errmsg.txt: Auto merged sql/share/portuguese/errmsg.txt: Auto merged sql/share/romanian/errmsg.txt: Auto merged sql/share/russian/errmsg.txt: Auto merged sql/share/slovak/errmsg.txt: Auto merged sql/share/spanish/errmsg.txt: Auto merged sql/share/ukrainian/errmsg.txt: Auto merged mysql-test/t/rpl000015.slave-mi: Auto merged mysql-test/t/rpl_rotate_logs.slave-mi: Auto merged mysql-test/mysql-test-run.sh: merge with 3.23 scripts/make_binary_distribution.sh: merge with 3.23 sql/share/czech/errmsg.txt: merge with 3.23 sql/share/danish/errmsg.txt: merge with 3.23 sql/share/dutch/errmsg.txt: merge with 3.23 sql/share/estonian/errmsg.txt: merge with 3.23 sql/share/swedish/errmsg.txt: merge with 3.23 sql/sql_class.cc: merge with 3.23 (Keep local copy)
Diffstat (limited to 'innobase/ibuf')
-rw-r--r--innobase/ibuf/ibuf0ibuf.c43
1 files changed, 41 insertions, 2 deletions
diff --git a/innobase/ibuf/ibuf0ibuf.c b/innobase/ibuf/ibuf0ibuf.c
index 668e9419c24..5cd066afc27 100644
--- a/innobase/ibuf/ibuf0ibuf.c
+++ b/innobase/ibuf/ibuf0ibuf.c
@@ -2488,7 +2488,9 @@ ibuf_merge_or_delete_for_page(
ulint old_bits;
ulint new_bits;
dulint max_trx_id;
+ ibool corruption_noticed = FALSE;
mtr_t mtr;
+ char err_buf[500];
if (srv_force_recovery >= SRV_FORCE_NO_IBUF_MERGE) {
@@ -2540,7 +2542,38 @@ ibuf_merge_or_delete_for_page(
block = buf_block_align(page);
rw_lock_x_lock_move_ownership(&(block->lock));
- ut_a(fil_page_get_type(page) == FIL_PAGE_INDEX);
+ if (fil_page_get_type(page) != FIL_PAGE_INDEX) {
+
+ corruption_noticed = TRUE;
+
+ ut_print_timestamp(stderr);
+
+ mtr_start(&mtr);
+
+ fprintf(stderr,
+" InnoDB: Dump of the ibuf bitmap page:\n");
+
+ bitmap_page = ibuf_bitmap_get_map_page(space, page_no,
+ &mtr);
+ buf_page_print(bitmap_page);
+
+ mtr_commit(&mtr);
+
+ fprintf(stderr, "\nInnoDB: Dump of the page:\n");
+
+ buf_page_print(page);
+
+ fprintf(stderr,
+"InnoDB: Error: corruption in the tablespace. Bitmap shows insert\n"
+"InnoDB: buffer records to page n:o %lu though the page\n"
+"InnoDB: type is %lu, which is not an index page!\n"
+"InnoDB: We try to resolve the problem by skipping the insert buffer\n"
+"InnoDB: merge for this page. Please run CHECK TABLE on your tables\n"
+"InnoDB: to determine if they are corrupt after this.\n\n"
+"InnoDB: Please make a detailed bug report and send it to\n"
+"InnoDB: mysql@lists.mysql.com\n\n",
+ page_no, fil_page_get_type(page));
+ }
}
n_inserts = 0;
@@ -2583,8 +2616,14 @@ loop:
goto reset_bit;
}
+
+ if (corruption_noticed) {
+ rec_sprintf(err_buf, 450, ibuf_rec);
+
+ fprintf(stderr,
+"InnoDB: Discarding record\n %s\n from the insert buffer!\n\n", err_buf);
- if (page) {
+ } else if (page) {
/* Now we have at pcur a record which should be
inserted to the index page; NOTE that the call below
copies pointers to fields in ibuf_rec, and we must