diff options
author | Marko Mäkelä <marko.makela@oracle.com> | 2010-10-19 09:44:38 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@oracle.com> | 2010-10-19 09:44:38 +0300 |
commit | 923003f99dfc03a173b9e683853aa73931c38352 (patch) | |
tree | 1d4e54f562695fe61c4b52106f4f1b393d9f3572 /storage/innobase/ibuf | |
parent | 6dfc85f0f7873a368c7036625d3e2361ec2c856c (diff) | |
download | mariadb-git-923003f99dfc03a173b9e683853aa73931c38352.tar.gz |
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.
Diffstat (limited to 'storage/innobase/ibuf')
-rw-r--r-- | storage/innobase/ibuf/ibuf0ibuf.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/storage/innobase/ibuf/ibuf0ibuf.c b/storage/innobase/ibuf/ibuf0ibuf.c index 53a11a7f2e0..7ef577e5178 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.c +++ b/storage/innobase/ibuf/ibuf0ibuf.c @@ -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" |