mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
post-push fix for bug#17565888/bug#14621190
This commit is contained in:
@@ -124,7 +124,6 @@ btr_pcur_store_position(
|
||||
|
||||
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_S_FIX)
|
||||
|| mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
|
||||
ut_a(cursor->latch_mode != BTR_NO_LATCHES);
|
||||
|
||||
if (UNIV_UNLIKELY(page_get_n_recs(page) == 0)) {
|
||||
/* It must be an empty index tree; NOTE that in this case
|
||||
@@ -271,6 +270,7 @@ btr_pcur_restore_position_func(
|
||||
cursor->modify_clock,
|
||||
file, line, mtr)) {
|
||||
cursor->pos_state = BTR_PCUR_IS_POSITIONED;
|
||||
cursor->latch_mode = latch_mode;
|
||||
|
||||
buf_block_dbg_add_level(
|
||||
btr_pcur_get_block(cursor),
|
||||
@@ -282,9 +282,6 @@ btr_pcur_restore_position_func(
|
||||
const rec_t* rec;
|
||||
const ulint* offsets1;
|
||||
const ulint* offsets2;
|
||||
#endif /* UNIV_DEBUG */
|
||||
cursor->latch_mode = latch_mode;
|
||||
#ifdef UNIV_DEBUG
|
||||
rec = btr_pcur_get_rec(cursor);
|
||||
|
||||
heap = mem_heap_create(256);
|
||||
@@ -305,7 +302,10 @@ btr_pcur_restore_position_func(
|
||||
/* This is the same record as stored,
|
||||
may need to be adjusted for BTR_PCUR_BEFORE/AFTER,
|
||||
depending on search mode and direction. */
|
||||
cursor->pos_state = BTR_PCUR_IS_POSITIONED_OPTIMISTIC;
|
||||
if (btr_pcur_is_on_user_rec(cursor)) {
|
||||
cursor->pos_state
|
||||
= BTR_PCUR_IS_POSITIONED_OPTIMISTIC;
|
||||
}
|
||||
return(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3108,6 +3108,8 @@ sel_restore_position_for_mysql(
|
||||
|| pcur->rel_pos == BTR_PCUR_AFTER);
|
||||
} else {
|
||||
ut_ad(pcur->pos_state == BTR_PCUR_IS_POSITIONED);
|
||||
ut_ad((pcur->rel_pos == BTR_PCUR_ON)
|
||||
== btr_pcur_is_on_user_rec(pcur));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user