diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-11-30 12:47:38 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-11-30 12:47:38 +0200 |
commit | 3afae13b548c903d86a55530d59fbf7d8666281f (patch) | |
tree | d4eb497b4e9ffb5fd5e5c9ea1744273ae565b4b6 /storage | |
parent | b37424673014c3350d51b1b2cfd45c76a7cdb90c (diff) | |
parent | e46a3aa42e1d391cef30881809d8b0d5416489c0 (diff) | |
download | mariadb-git-3afae13b548c903d86a55530d59fbf7d8666281f.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/rem/rem0cmp.cc | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/storage/innobase/rem/rem0cmp.cc b/storage/innobase/rem/rem0cmp.cc index f8449e5443f..623d0bd1aa9 100644 --- a/storage/innobase/rem/rem0cmp.cc +++ b/storage/innobase/rem/rem0cmp.cc @@ -25,6 +25,7 @@ Created 7/1/1994 Heikki Tuuri #include "rem0cmp.h" #include "rem0rec.h" +#include "page0page.h" #include "dict0mem.h" #include "handler0alter.h" @@ -787,20 +788,23 @@ cmp_dtuple_rec_with_match_bytes( ulint* matched_fields, ulint* matched_bytes) { - ulint n_cmp = dtuple_get_n_fields_cmp(dtuple); - ulint cur_field; /* current field number */ - ulint cur_bytes; - int ret; /* return value */ - ut_ad(dtuple_check_typed(dtuple)); ut_ad(rec_offs_validate(rec, index, offsets)); ut_ad(!(REC_INFO_MIN_REC_FLAG & dtuple_get_info_bits(dtuple))); - ut_ad(!(REC_INFO_MIN_REC_FLAG - & rec_get_info_bits(rec, rec_offs_comp(offsets)))); - cur_field = *matched_fields; - cur_bytes = *matched_bytes; + if (UNIV_UNLIKELY(REC_INFO_MIN_REC_FLAG + & rec_get_info_bits(rec, rec_offs_comp(offsets)))) { + ut_ad(page_rec_is_first(rec, page_align(rec))); + ut_ad(!page_has_prev(page_align(rec))); + ut_ad(rec_is_metadata(rec, *index)); + return 1; + } + + ulint cur_field = *matched_fields; + ulint cur_bytes = *matched_bytes; + ulint n_cmp = dtuple_get_n_fields_cmp(dtuple); + int ret; ut_ad(n_cmp <= dtuple_get_n_fields(dtuple)); ut_ad(cur_field <= n_cmp); |