diff options
author | unknown <marko@hundin.mysql.fi> | 2005-06-16 16:59:49 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2005-06-16 16:59:49 +0300 |
commit | ca25e99b16c85679b57baaed2807143c034c8598 (patch) | |
tree | a7c0dcb29bd61bfdafebaaff6dd8b2b207ee51f1 | |
parent | 76a11195b8f6af78ca7c90d5fea0ed751cdb3751 (diff) | |
download | mariadb-git-ca25e99b16c85679b57baaed2807143c034c8598.tar.gz |
InnoDB: After review fixes
innobase/include/page0page.ic:
page_rec_set_next(): s/ut_a()/ut_ad()/
page_rec_get_prev(): Eliminate a buf_frame_align() call
innobase/lock/lock0lock.c:
lock_rec_get_first(): Determine heap_no before the loop
-rw-r--r-- | innobase/include/page0page.ic | 4 | ||||
-rw-r--r-- | innobase/lock/lock0lock.c | 14 |
2 files changed, 6 insertions, 12 deletions
diff --git a/innobase/include/page0page.ic b/innobase/include/page0page.ic index cef8f6a1b80..fd5281fdbec 100644 --- a/innobase/include/page0page.ic +++ b/innobase/include/page0page.ic @@ -597,7 +597,7 @@ page_rec_set_next( if (next) { ut_ad(!page_rec_is_infimum(next)); - ut_a(page == ut_align_down(next, UNIV_PAGE_SIZE)); + ut_ad(page == ut_align_down(next, UNIV_PAGE_SIZE)); offs = (ulint) (next - page); } else { offs = 0; @@ -624,7 +624,7 @@ page_rec_get_prev( ut_ad(page_rec_check(rec)); - page = buf_frame_align(rec); + page = ut_align_down(rec, UNIV_PAGE_SIZE); ut_ad(!page_rec_is_infimum(rec)); 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); } } |