Commit d836a705 authored by marko's avatar marko

branches/innodb+: ibuf_insert_low(): Ignore the free bits in the

insert buffer bitmap when buffering deletes or delete-marks.

TODO: ibuf_get_volume_buffered() should return only the volume of
the buffered inserts, not deletes or delete-marks.
parent dfde1c3b
...@@ -2999,7 +2999,6 @@ ibuf_insert_low( ...@@ -2999,7 +2999,6 @@ ibuf_insert_low(
ib_int64_t space_versions[IBUF_MAX_N_PAGES_MERGED]; ib_int64_t space_versions[IBUF_MAX_N_PAGES_MERGED];
ulint page_nos[IBUF_MAX_N_PAGES_MERGED]; ulint page_nos[IBUF_MAX_N_PAGES_MERGED];
ulint n_stored; ulint n_stored;
ulint bits;
mtr_t mtr; mtr_t mtr;
mtr_t bitmap_mtr; mtr_t bitmap_mtr;
...@@ -3115,8 +3114,10 @@ ibuf_insert_low( ...@@ -3115,8 +3114,10 @@ ibuf_insert_low(
goto function_exit; goto function_exit;
} }
bits = ibuf_bitmap_page_get_bits(bitmap_page, page_no, zip_size, if (op == IBUF_OP_INSERT) {
IBUF_BITMAP_FREE, &bitmap_mtr); ulint bits = ibuf_bitmap_page_get_bits(
bitmap_page, page_no, zip_size, IBUF_BITMAP_FREE,
&bitmap_mtr);
if (buffered + entry_size + page_dir_calc_reserved_space(1) if (buffered + entry_size + page_dir_calc_reserved_space(1)
> ibuf_index_page_calc_free_from_bits(zip_size, bits)) { > ibuf_index_page_calc_free_from_bits(zip_size, bits)) {
...@@ -3129,10 +3130,12 @@ ibuf_insert_low( ...@@ -3129,10 +3130,12 @@ ibuf_insert_low(
ibuf_get_merge_page_nos( ibuf_get_merge_page_nos(
FALSE, btr_pcur_get_rec(&pcur), FALSE, btr_pcur_get_rec(&pcur),
space_ids, space_versions, page_nos, &n_stored); space_ids, space_versions,
page_nos, &n_stored);
goto function_exit; goto function_exit;
} }
}
/* Patch correct counter value to the entry to insert. This can /* Patch correct counter value to the entry to insert. This can
change the insert position, which can result in the need to abort in change the insert position, which can result in the need to abort in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment