summaryrefslogtreecommitdiff
path: root/innobase/ibuf
diff options
context:
space:
mode:
authorheikki@hundin.mysql.fi <>2002-06-22 20:41:14 +0300
committerheikki@hundin.mysql.fi <>2002-06-22 20:41:14 +0300
commit128e872f3cc19ec59cb6e07dbb638732797b3f15 (patch)
treecd94be28879d52101bd7438dc97dc04856d81739 /innobase/ibuf
parent8056af30e467350a3725c0324bd2142b8fd26801 (diff)
downloadmariadb-git-128e872f3cc19ec59cb6e07dbb638732797b3f15.tar.gz
Many files:
Merge 3.23.52
Diffstat (limited to 'innobase/ibuf')
-rw-r--r--innobase/ibuf/ibuf0ibuf.c47
1 files changed, 30 insertions, 17 deletions
diff --git a/innobase/ibuf/ibuf0ibuf.c b/innobase/ibuf/ibuf0ibuf.c
index bd1f0e6e1d8..f51a924c87f 100644
--- a/innobase/ibuf/ibuf0ibuf.c
+++ b/innobase/ibuf/ibuf0ibuf.c
@@ -685,21 +685,21 @@ ibuf_bitmap_get_map_page(
/****************************************************************************
Sets the free bits of the page in the ibuf bitmap. This is done in a separate
mini-transaction, hence this operation does not restrict further work to only
-ibuf bitmap operations, which would result if the latch to the bitmap pag
+ibuf bitmap operations, which would result if the latch to the bitmap page
were kept. */
UNIV_INLINE
void
ibuf_set_free_bits_low(
/*===================*/
ulint type, /* in: index type */
- page_t* page, /* in: index page; free bit is reset if the index is
- a non-clustered non-unique, and page level is 0 */
+ page_t* page, /* in: index page; free bit is set if the index is
+ non-clustered and page level is 0 */
ulint val, /* in: value to set: < 4 */
mtr_t* mtr) /* in: mtr */
{
page_t* bitmap_page;
- if (type & (DICT_CLUSTERED | DICT_UNIQUE)) {
+ if (type & DICT_CLUSTERED) {
return;
}
@@ -733,8 +733,8 @@ void
ibuf_set_free_bits(
/*===============*/
ulint type, /* in: index type */
- page_t* page, /* in: index page; free bit is reset if the index is
- a non-clustered non-unique, and page level is 0 */
+ page_t* page, /* in: index page; free bit is set if the index is
+ non-clustered and page level is 0 */
ulint val, /* in: value to set: < 4 */
ulint max_val)/* in: ULINT_UNDEFINED or a maximum value which
the bits must have before setting; this is for
@@ -743,7 +743,7 @@ ibuf_set_free_bits(
mtr_t mtr;
page_t* bitmap_page;
- if (type & (DICT_CLUSTERED | DICT_UNIQUE)) {
+ if (type & DICT_CLUSTERED) {
return;
}
@@ -2024,7 +2024,7 @@ ibuf_insert_low(
ulint n_stored;
ulint bits;
- ut_a(!(index->type & (DICT_UNIQUE | DICT_CLUSTERED)));
+ ut_a(!(index->type & DICT_CLUSTERED));
ut_ad(dtuple_check_typed(entry));
do_merge = FALSE;
@@ -2254,10 +2254,7 @@ ibuf_insert(
ut_ad(dtuple_check_typed(entry));
- if (index->type & DICT_CLUSTERED || index->type & DICT_UNIQUE) {
-
- return(FALSE);
- }
+ ut_a(!(index->type & DICT_CLUSTERED));
if (rec_get_converted_size(entry)
>= page_get_free_space_of_empty() / 2) {
@@ -2302,6 +2299,7 @@ ibuf_insert_to_index_page(
rec_t* rec;
page_t* bitmap_page;
ulint old_bits;
+ char errbuf[1000];
ut_ad(ibuf_inside());
ut_ad(dtuple_check_typed(entry));
@@ -2324,11 +2322,24 @@ ibuf_insert_to_index_page(
/* This time the record must fit */
if (!page_cur_tuple_insert(&page_cur, entry, mtr)) {
- printf(
- "Ibuf insert fails; page free %lu, dtuple size %lu\n",
+
+ ut_print_timestamp(stderr);
+
+ fprintf(stderr,
+"InnoDB: Error: Insert buffer insert fails; page free %lu, dtuple size %lu\n",
page_get_max_insert_size(page, 1),
rec_get_converted_size(entry));
+ dtuple_sprintf(errbuf, 900, entry);
+
+ fprintf(stderr,
+"InnoDB: Cannot insert index record %s\n", errbuf);
+
+ fprintf(stderr,
+"InnoDB: The table where where this index record belongs\n"
+"InnoDB: is now probably corrupt. Please run CHECK TABLE on\n"
+"InnoDB: that table.\n");
+
bitmap_page = ibuf_bitmap_get_map_page(
buf_frame_get_space_id(page),
buf_frame_get_page_no(page),
@@ -2339,9 +2350,11 @@ ibuf_insert_to_index_page(
buf_frame_get_page_no(page),
IBUF_BITMAP_FREE, mtr);
- printf("Bitmap bits %lu\n", old_bits);
-
- ut_error;
+ fprintf(stderr, "Bitmap bits %lu\n", old_bits);
+
+ fprintf(stderr,
+"InnoDB: Send a detailed bug report to mysql@lists.mysql.com!\n");
+
}
}
}