diff options
author | unknown <monty@mashka.mysql.fi> | 2002-07-25 22:46:28 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2002-07-25 22:46:28 +0300 |
commit | 6ba1aefe909df2651fcace1fe184e3f093d07ab4 (patch) | |
tree | f38c137c73206e3d059517b2bcab6a4a43c957f9 /innobase/ibuf | |
parent | 29cec51551b7a6be66ebf2048f9045eeb0f59d94 (diff) | |
parent | 714e9c881e5af8bbb54c336d0327bae8e4559019 (diff) | |
download | mariadb-git-6ba1aefe909df2651fcace1fe184e3f093d07ab4.tar.gz |
Merge with 3.23.51
Fixed wrong usage of sprintf() in ha_innodb.cc
BitKeeper/etc/logging_ok:
auto-union
BitKeeper/deleted/.del-global.h~e80d28157acfdcb5:
Auto merged
Docs/manual.ja.texi:
Auto merged
include/config-os2.h:
Auto merged
innobase/btr/btr0btr.c:
Auto merged
innobase/btr/btr0cur.c:
Auto merged
innobase/btr/btr0sea.c:
Auto merged
innobase/buf/buf0buf.c:
Auto merged
innobase/data/data0data.c:
Auto merged
innobase/dict/dict0crea.c:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
innobase/fil/fil0fil.c:
Auto merged
innobase/fsp/fsp0fsp.c:
Auto merged
innobase/ibuf/ibuf0ibuf.c:
Auto merged
innobase/include/buf0buf.ic:
Auto merged
innobase/include/srv0srv.h:
Auto merged
innobase/lock/lock0lock.c:
Auto merged
innobase/log/log0log.c:
Auto merged
innobase/mtr/mtr0mtr.c:
Auto merged
innobase/os/os0file.c:
Auto merged
innobase/page/page0cur.c:
Auto merged
innobase/page/page0page.c:
Auto merged
innobase/rem/rem0cmp.c:
Auto merged
innobase/row/row0ins.c:
Auto merged
innobase/row/row0purge.c:
Auto merged
innobase/row/row0umod.c:
Auto merged
innobase/row/row0upd.c:
Auto merged
innobase/sync/sync0arr.c:
Auto merged
innobase/sync/sync0sync.c:
Auto merged
innobase/trx/trx0roll.c:
Auto merged
innobase/trx/trx0trx.c:
Auto merged
innobase/trx/trx0undo.c:
Auto merged
innobase/ut/ut0ut.c:
Auto merged
isam/pack_isam.c:
Auto merged
mysys/Makefile.am:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/key.cc:
Auto merged
sql/mini_client.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/table.cc:
Auto merged
support-files/my-huge.cnf.sh:
Auto merged
support-files/my-large.cnf.sh:
Auto merged
support-files/my-medium.cnf.sh:
Auto merged
support-files/my-small.cnf.sh:
Auto merged
Docs/manual.texi:
Merge with 3.23.51
configure.in:
Merge with 3.23.51
include/Makefile.am:
Merge with 3.23.51
innobase/dict/dict0load.c:
Merge with 3.23.51
innobase/include/univ.i:
Merge with 3.23.51
innobase/row/row0mysql.c:
Merge with 3.23.51
innobase/srv/srv0srv.c:
Merge with 3.23.51
innobase/srv/srv0start.c:
Merge with 3.23.51
myisam/mi_cache.c:
Merge with 3.23.51
myisammrg/myrg_rnext.c:
Merge with 3.23.51
myisammrg/myrg_rprev.c:
Merge with 3.23.51
sql/ha_innodb.cc:
Merge with 3.23.51
Changed used of sprintf() to make code portable.
sql/handler.cc:
Indentation change
sql/lex.h:
Comment cleanup
sql/log.cc:
Merge with 3.23.51
sql/log_event.h:
Merge with 3.23.51
sql/mysql_priv.h:
Merge with 3.23.51
sql/mysqld.cc:
Merge with 3.23.51
Cleaned up handling of innodb_flush_log_at_trx_commit
sql/share/portuguese/errmsg.txt:
Merge with 3.23.51
sql/slave.cc:
Not merged as this affects many files; Will be fixed in next changeset
sql/slave.h:
Merge with 3.23.51
sql/sql_acl.cc:
Merge with 3.23.51 (no changes)
sql/sql_db.cc:
Merge with 3.23.51
sql/sql_parse.cc:
Merge with 3.23.51
sql/sql_yacc.yy:
Merge with 3.23.51
(Renamed NO_FOREIGN_KEY_CHECKS and RELAXED_UNIQUE_CHECKS)
support-files/mysql.spec.sh:
Merge with 3.23.51
Diffstat (limited to 'innobase/ibuf')
-rw-r--r-- | innobase/ibuf/ibuf0ibuf.c | 63 |
1 files changed, 42 insertions, 21 deletions
diff --git a/innobase/ibuf/ibuf0ibuf.c b/innobase/ibuf/ibuf0ibuf.c index a6355ce7ca5..b7d691485cc 100644 --- a/innobase/ibuf/ibuf0ibuf.c +++ b/innobase/ibuf/ibuf0ibuf.c @@ -687,21 +687,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; } @@ -735,8 +735,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 @@ -745,7 +745,7 @@ ibuf_set_free_bits( mtr_t mtr; page_t* bitmap_page; - if (type & (DICT_CLUSTERED | DICT_UNIQUE)) { + if (type & DICT_CLUSTERED) { return; } @@ -2026,7 +2026,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; @@ -2256,10 +2256,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) { @@ -2304,6 +2301,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)); @@ -2326,11 +2324,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), @@ -2341,9 +2352,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"); + } } } @@ -2692,22 +2705,30 @@ ibuf_validate_low(void) Prints info of ibuf. */ void -ibuf_print(void) -/*============*/ +ibuf_print( +/*=======*/ + char* buf, /* in/out: buffer where to print */ + char* buf_end)/* in: buffer end */ { ibuf_data_t* data; #ifdef UNIV_IBUF_DEBUG ulint i; #endif + if (buf_end - buf < 500) { + return; + } + mutex_enter(&ibuf_mutex); data = UT_LIST_GET_FIRST(ibuf->data_list); while (data) { - printf( + buf += sprintf(buf, "Ibuf for space %lu: size %lu, free list len %lu, seg size %lu,\n", data->space, data->size, data->free_list_len, data->seg_size); - printf("%lu inserts, %lu merged recs, %lu merges\n", + + buf += sprintf(buf, + "%lu inserts, %lu merged recs, %lu merges\n", data->n_inserts, data->n_merged_recs, data->n_merges); #ifdef UNIV_IBUF_DEBUG for (i = 0; i < IBUF_COUNT_N_PAGES; i++) { |