Commit 84e9560a authored by Marko Mäkelä's avatar Marko Mäkelä

btr_cur_search_to_nth_level(): Add a debug assertion

and some Valgrind instrumentation.
parent c2dc9371
...@@ -321,7 +321,12 @@ btr_cur_search_to_nth_level( ...@@ -321,7 +321,12 @@ btr_cur_search_to_nth_level(
ut_ad(dict_index_check_search_tuple(index, tuple)); ut_ad(dict_index_check_search_tuple(index, tuple));
ut_ad(!(index->type & DICT_IBUF) || ibuf_inside()); ut_ad(!(index->type & DICT_IBUF) || ibuf_inside());
ut_ad(dtuple_check_typed(tuple)); ut_ad(dtuple_check_typed(tuple));
ut_ad(index->page != FIL_NULL);
UNIV_MEM_INVALID(&cursor->up_match, sizeof cursor->up_match);
UNIV_MEM_INVALID(&cursor->up_bytes, sizeof cursor->up_bytes);
UNIV_MEM_INVALID(&cursor->low_match, sizeof cursor->low_match);
UNIV_MEM_INVALID(&cursor->low_bytes, sizeof cursor->low_bytes);
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
cursor->up_match = ULINT_UNDEFINED; cursor->up_match = ULINT_UNDEFINED;
cursor->low_match = ULINT_UNDEFINED; cursor->low_match = ULINT_UNDEFINED;
......
...@@ -393,7 +393,12 @@ btr_cur_search_to_nth_level( ...@@ -393,7 +393,12 @@ btr_cur_search_to_nth_level(
ut_ad(dict_index_check_search_tuple(index, tuple)); ut_ad(dict_index_check_search_tuple(index, tuple));
ut_ad(!dict_index_is_ibuf(index) || ibuf_inside()); ut_ad(!dict_index_is_ibuf(index) || ibuf_inside());
ut_ad(dtuple_check_typed(tuple)); ut_ad(dtuple_check_typed(tuple));
ut_ad(index->page != FIL_NULL);
UNIV_MEM_INVALID(&cursor->up_match, sizeof cursor->up_match);
UNIV_MEM_INVALID(&cursor->up_bytes, sizeof cursor->up_bytes);
UNIV_MEM_INVALID(&cursor->low_match, sizeof cursor->low_match);
UNIV_MEM_INVALID(&cursor->low_bytes, sizeof cursor->low_bytes);
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
cursor->up_match = ULINT_UNDEFINED; cursor->up_match = ULINT_UNDEFINED;
cursor->low_match = ULINT_UNDEFINED; cursor->low_match = ULINT_UNDEFINED;
......
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