3188 Marko Mäkelä 2010-10-19
ibuf_set_del_mark(): Do not complain about already delete-marked records.
According to a comment in row_upd_sec_index_entry(), it is a
legitimate situation that can be caused by a lock wait.
modified:
storage/innobase/ibuf/ibuf0ibuf.c
3187 Marko Mäkelä 2010-10-19 [merge]
Merge Bug #56680 from mysql-5.1.
Additional fixes in 5.5:
ibuf_set_del_mark(): Add diagnostics when setting a buffered delete-mark fails.
ibuf_delete(): Correct a misleading comment about non-found records.
rec_print(): Add a const qualifier to the index parameter.
Bug #56680 wrong InnoDB results from a case-insensitive covering index
row_search_for_mysql(): When a secondary index record might not be
visible in the current transaction's read view and we consult the
clustered index and optionally some undo log records, return the
relevant columns of the clustered index record to MySQL instead of the
secondary index record.
ibuf_insert_to_index_page_low(): New function, refactored from
ibuf_insert_to_index_page().
ibuf_insert_to_index_page(): When we are inserting a record in place
of a delete-marked record and some fields of the record differ, update
that record just like row_ins_sec_index_entry_by_modify() would do.
btr_cur_update_alloc_zip(): Make the function public.
mysql_row_templ_t: Add clust_rec_field_no.
row_sel_store_mysql_rec(), row_sel_push_cache_row_for_mysql(): Add the
flag rec_clust, for returning data at clust_rec_field_no instead of
rec_field_no. Resurrect the debug assertion that the record not be
marked for deletion. (Bug #55626)
[UNIV_DEBUG || UNIV_IBUF_DEBUG] ibuf_debug, buf_page_get_gen(),
buf_flush_page_try():
Implement innodb_change_buffering_debug=1 for evicting pages from the
buffer pool, so that change buffering will be attempted more
frequently.
added:
mysql-test/suite/innodb/r/innodb_bug56680.result
mysql-test/suite/innodb/t/innodb_bug56680.test
modified:
storage/innobase/btr/btr0cur.c
storage/innobase/buf/buf0buf.c
storage/innobase/buf/buf0flu.c
storage/innobase/handler/ha_innodb.cc
storage/innobase/ibuf/ibuf0ibuf.c
storage/innobase/include/btr0cur.h
storage/innobase/include/buf0flu.h
storage/innobase/include/ibuf0ibuf.h
storage/innobase/include/rem0rec.h
storage/innobase/include/row0mysql.h
storage/innobase/include/row0upd.h
storage/innobase/rem/rem0rec.c
storage/innobase/row/row0mysql.c
storage/innobase/row/row0sel.c
storage/innobase/row/row0upd.c
=== modified file 'storage/innobase/ibuf/ibuf0ibuf.c'
--- a/storage/innobase/ibuf/ibuf0ibuf.c revid:marko.makela@strippedo0fdd
+++ b/storage/innobase/ibuf/ibuf0ibuf.c revid:marko.makela@stripped
@@ -3997,21 +3997,22 @@ ibuf_set_del_mark(
rec = page_cur_get_rec(&page_cur);
page_zip = page_cur_get_page_zip(&page_cur);
- if (UNIV_UNLIKELY
- (rec_get_deleted_flag(
+ /* Delete mark the old index record. According to a
+ comment in row_upd_sec_index_entry(), it can already
+ have been delete marked if a lock wait occurred in
+ row_ins_index_entry() in a previous invocation of
+ row_upd_sec_index_entry(). */
+
+ if (UNIV_LIKELY
+ (!rec_get_deleted_flag(
rec, dict_table_is_comp(index->table)))) {
- ut_print_timestamp(stderr);
- fputs(" InnoDB: record is already delete-marked\n",
- stderr);
- goto failure;
+ btr_cur_set_deleted_flag_for_ibuf(rec, page_zip,
+ TRUE, mtr);
}
-
- btr_cur_set_deleted_flag_for_ibuf(rec, page_zip, TRUE, mtr);
} else {
ut_print_timestamp(stderr);
fputs(" InnoDB: unable to find a record to delete-mark\n",
stderr);
-failure:
fputs("InnoDB: tuple ", stderr);
dtuple_print(stderr, entry);
fputs("\n"
Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20101019064438-gfls1n6fign1brrh.bundle
| Thread |
|---|
| • bzr push into mysql-5.5-innodb branch (marko.makela:3187 to 3188) | marko.makela | 19 Oct |