Commit f784ab22 authored by marko's avatar marko

branches/innodb+: btr_cur_search_to_nth_level(): Move some code before

the only goto loop_end after the loop_end: label to improve
readability.
parent 1fce72cc
...@@ -680,15 +680,6 @@ btr_cur_search_to_nth_level( ...@@ -680,15 +680,6 @@ btr_cur_search_to_nth_level(
if (level == height) { if (level == height) {
if (level > 0) {
/* x-latch the page */
page = btr_page_get(
space, zip_size, page_no, RW_X_LATCH, mtr);
ut_a((ibool)!!page_is_comp(page)
== dict_table_is_comp(index->table));
}
goto loop_end; goto loop_end;
} }
...@@ -727,7 +718,14 @@ btr_cur_search_to_nth_level( ...@@ -727,7 +718,14 @@ btr_cur_search_to_nth_level(
goto search_loop; goto search_loop;
loop_end: loop_end:
if (level == 0) { if (level != 0) {
/* x-latch the page */
page = btr_page_get(
space, zip_size, page_no, RW_X_LATCH, mtr);
ut_a((ibool)!!page_is_comp(page)
== dict_table_is_comp(index->table));
} else {
cursor->low_match = low_match; cursor->low_match = low_match;
cursor->low_bytes = low_bytes; cursor->low_bytes = low_bytes;
cursor->up_match = up_match; cursor->up_match = up_match;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment