summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2021-07-05 16:29:21 +0300
committerAleksey Midenkov <midenok@gmail.com>2021-07-12 11:32:45 +0300
commit719cad1c0aca64f2e5b48545307cc6f9318cd2fe (patch)
tree7f7f0225350e6151ba1e061c928d53dbca8df9f8
parent3a686b316cad118d0898d0ed1c9ae872ec162029 (diff)
downloadmariadb-git-719cad1c0aca64f2e5b48545307cc6f9318cd2fe.tar.gz
Cleanup
-rw-r--r--storage/innobase/row/row0sel.cc26
1 files changed, 12 insertions, 14 deletions
diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc
index bdfe51f0c36..6f96a1ea938 100644
--- a/storage/innobase/row/row0sel.cc
+++ b/storage/innobase/row/row0sel.cc
@@ -4333,8 +4333,8 @@ row_search_mvcc(
ibool table_lock_waited = FALSE;
byte* next_buf = 0;
bool spatial_search = false;
- bool is_infimum = false;
- bool is_supremum = false;
+ bool was_infimum = false;
+ bool was_supremum = false;
ut_ad(index && pcur && search_tuple);
ut_a(prebuilt->magic_n == ROW_PREBUILT_ALLOCATED);
@@ -5811,16 +5811,16 @@ lock_wait_or_error:
if (!dict_index_is_spatial(index)) {
/* Locked gap may be filled with inserted records.
Make sure we don't miss them. */
- is_infimum = false;
- is_supremum = false;
+ was_infimum = false;
+ was_supremum = false;
if (moves_up) {
btr_pcur_move_to_prev(pcur, &mtr);
rec = btr_pcur_get_rec(pcur);
- is_infimum= page_rec_is_infimum(rec);
+ was_infimum= page_rec_is_infimum(rec);
} else {
btr_pcur_move_to_next(pcur, &mtr);
rec = btr_pcur_get_rec(pcur);
- is_supremum= page_rec_is_supremum(rec);
+ was_supremum= page_rec_is_supremum(rec);
}
btr_pcur_store_position(pcur, &mtr);
}
@@ -5858,18 +5858,16 @@ lock_table_wait:
sel_restore_position_for_mysql(
&same_user_rec, BTR_SEARCH_LEAF, pcur,
moves_up, &mtr);
- if (is_infimum)
- {
+ /* Counterpart of the stepping backward in lock_wait_or_error.
+ This is linked tight with that btr_pcur_store_position().
+ The jumps to page_read_error: and lock_table_wait: do not get here. */
+ if (was_infimum) {
ut_ad(moves_up);
btr_pcur_move_before_first_on_page(pcur);
- } else if (is_supremum) {
+ } else if (was_supremum) {
ut_ad(!moves_up);
btr_pcur_move_after_last_on_page(pcur);
- }
- /* Counterpart of the stepping backward in lock_wait_or_error.
- This is linked tight with that btr_pcur_store_position().
- The jumps to page_read_error: and lock_table_wait: do not get here. */
- if (same_user_rec) {
+ } else if (same_user_rec) {
if (!moves_up) {
btr_pcur_move_to_prev(pcur, &mtr);
} else {