summaryrefslogtreecommitdiff
path: root/innobase/lock/lock0lock.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/lock/lock0lock.c')
-rw-r--r--innobase/lock/lock0lock.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/innobase/lock/lock0lock.c b/innobase/lock/lock0lock.c
index f2d5d035ab1..d28cc99ac38 100644
--- a/innobase/lock/lock0lock.c
+++ b/innobase/lock/lock0lock.c
@@ -1304,16 +1304,10 @@ lock_rec_get_first(
lock = lock_rec_get_first_on_page(rec);
if (UNIV_LIKELY_NULL(lock)) {
- if (page_rec_is_comp(rec)) {
- while (lock && !lock_rec_get_nth_bit(lock,
- rec_get_heap_no(rec, TRUE))) {
- lock = lock_rec_get_next_on_page(lock);
- }
- } else {
- while (lock && !lock_rec_get_nth_bit(lock,
- rec_get_heap_no(rec, FALSE))) {
- lock = lock_rec_get_next_on_page(lock);
- }
+ ulint heap_no = rec_get_heap_no(rec, page_rec_is_comp(rec));
+
+ while (lock && !lock_rec_get_nth_bit(lock, heap_no)) {
+ lock = lock_rec_get_next_on_page(lock);
}
}