mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 06:22:28 +01:00
branches/innodb+: ibuf_insert_low(): Use common error handling
when holding a latch on the insert buffer bitmap page.
This commit is contained in:
parent
364910b122
commit
79e5dc96c4
1 changed files with 5 additions and 6 deletions
|
@ -3304,11 +3304,8 @@ ibuf_insert_low(
|
||||||
|
|
||||||
if (buf_page_peek(space, page_no)
|
if (buf_page_peek(space, page_no)
|
||||||
|| lock_rec_expl_exist_on_page(space, page_no)) {
|
|| lock_rec_expl_exist_on_page(space, page_no)) {
|
||||||
err = DB_STRONG_FAIL;
|
|
||||||
|
|
||||||
mtr_commit(&bitmap_mtr);
|
goto bitmap_fail;
|
||||||
|
|
||||||
goto function_exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (op == IBUF_OP_INSERT) {
|
if (op == IBUF_OP_INSERT) {
|
||||||
|
@ -3318,11 +3315,10 @@ ibuf_insert_low(
|
||||||
|
|
||||||
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)) {
|
||||||
|
/* Release the bitmap page latch early. */
|
||||||
mtr_commit(&bitmap_mtr);
|
mtr_commit(&bitmap_mtr);
|
||||||
|
|
||||||
/* It may not fit */
|
/* It may not fit */
|
||||||
err = DB_STRONG_FAIL;
|
|
||||||
|
|
||||||
do_merge = TRUE;
|
do_merge = TRUE;
|
||||||
|
|
||||||
ibuf_get_merge_page_nos(
|
ibuf_get_merge_page_nos(
|
||||||
|
@ -3330,6 +3326,8 @@ ibuf_insert_low(
|
||||||
space_ids, space_versions,
|
space_ids, space_versions,
|
||||||
page_nos, &n_stored);
|
page_nos, &n_stored);
|
||||||
|
|
||||||
|
err = DB_STRONG_FAIL;
|
||||||
|
|
||||||
goto function_exit;
|
goto function_exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3339,6 +3337,7 @@ ibuf_insert_low(
|
||||||
some cases. */
|
some cases. */
|
||||||
if (!ibuf_set_entry_counter(ibuf_entry, space, page_no, &pcur,
|
if (!ibuf_set_entry_counter(ibuf_entry, space, page_no, &pcur,
|
||||||
mode == BTR_MODIFY_PREV, &mtr)) {
|
mode == BTR_MODIFY_PREV, &mtr)) {
|
||||||
|
bitmap_fail:
|
||||||
err = DB_STRONG_FAIL;
|
err = DB_STRONG_FAIL;
|
||||||
|
|
||||||
mtr_commit(&bitmap_mtr);
|
mtr_commit(&bitmap_mtr);
|
||||||
|
|
Loading…
Reference in a new issue