diff options
author | Marko Mäkelä <marko.makela@oracle.com> | 2012-01-25 10:15:27 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@oracle.com> | 2012-01-25 10:15:27 +0200 |
commit | 1f9c1f09335080184d4e923e170eaf8b2335b646 (patch) | |
tree | 025e3f82d8536de2bb39a1f6e36eafc980d7048f | |
parent | 11279f9851b513efd9c60b71c7a36a0542281795 (diff) | |
download | mariadb-git-1f9c1f09335080184d4e923e170eaf8b2335b646.tar.gz |
btr_cur_search_to_nth_level(): Add a debug assertion
and some Valgrind instrumentation.
-rw-r--r-- | storage/innobase/btr/btr0cur.c | 5 | ||||
-rw-r--r-- | storage/innodb_plugin/btr/btr0cur.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c index 3c12e28feb6..c09d6408fa0 100644 --- a/storage/innobase/btr/btr0cur.c +++ b/storage/innobase/btr/btr0cur.c @@ -321,7 +321,12 @@ btr_cur_search_to_nth_level( ut_ad(dict_index_check_search_tuple(index, tuple)); ut_ad(!(index->type & DICT_IBUF) || ibuf_inside()); 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 cursor->up_match = ULINT_UNDEFINED; cursor->low_match = ULINT_UNDEFINED; diff --git a/storage/innodb_plugin/btr/btr0cur.c b/storage/innodb_plugin/btr/btr0cur.c index 9f4be053a43..46e850bb218 100644 --- a/storage/innodb_plugin/btr/btr0cur.c +++ b/storage/innodb_plugin/btr/btr0cur.c @@ -393,7 +393,12 @@ btr_cur_search_to_nth_level( ut_ad(dict_index_check_search_tuple(index, tuple)); ut_ad(!dict_index_is_ibuf(index) || ibuf_inside()); 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 cursor->up_match = ULINT_UNDEFINED; cursor->low_match = ULINT_UNDEFINED; |