summaryrefslogtreecommitdiff
path: root/storage/heap
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-09-22 17:11:40 +0300
committerMichael Widenius <monty@askmonty.org>2012-09-22 17:11:40 +0300
commit620d14f8c3521f9ec7283b8690e0e16434739d33 (patch)
treeb3438fd90e14b3be2ec21e53cca37cd795090a00 /storage/heap
parent288eeb3a31e4bfb52180f3906a4d354ac9cc457e (diff)
parent3e83c4e8f90851040be921443b52144a2862444a (diff)
downloadmariadb-git-620d14f8c3521f9ec7283b8690e0e16434739d33.tar.gz
Automatic merge
Diffstat (limited to 'storage/heap')
-rw-r--r--storage/heap/hp_hash.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/storage/heap/hp_hash.c b/storage/heap/hp_hash.c
index d44726ba762..2abed55459c 100644
--- a/storage/heap/hp_hash.c
+++ b/storage/heap/hp_hash.c
@@ -348,6 +348,8 @@ ulong hp_rec_hashnr(register HP_KEYDEF *keydef, register const uchar *rec)
seg->length/cs->mbmaxlen);
set_if_smaller(length, char_length);
}
+ else
+ set_if_smaller(length, seg->length);
cs->coll->hash_sort(cs, pos+pack_length, length, &nr, &nr2);
}
else
@@ -593,6 +595,11 @@ int hp_rec_key_cmp(HP_KEYDEF *keydef, const uchar *rec1, const uchar *rec2,
char_length2= my_charpos(cs, pos2, pos2 + char_length2, char_length);
set_if_smaller(char_length2, safe_length2);
}
+ else
+ {
+ set_if_smaller(char_length1, seg->length);
+ set_if_smaller(char_length2, seg->length);
+ }
if (cs->coll->strnncollsp(seg->charset,
pos1, char_length1,
@@ -689,6 +696,8 @@ int hp_key_cmp(HP_KEYDEF *keydef, const uchar *rec, const uchar *key)
char_length2= my_charpos(cs, pos, pos + char_length_rec, char_length2);
set_if_smaller(char_length_rec, char_length2);
}
+ else
+ set_if_smaller(char_length_rec, seg->length);
if (cs->coll->strnncollsp(seg->charset,
(uchar*) pos, char_length_rec,