summaryrefslogtreecommitdiff
path: root/heap
diff options
context:
space:
mode:
authorunknown <igor@igor-inspiron.creware.com>2005-07-08 02:12:31 -0700
committerunknown <igor@igor-inspiron.creware.com>2005-07-08 02:12:31 -0700
commit47c921e364b223469d8dd3cc58ce452715b547c9 (patch)
treeb327ee707bb5d0176bbcec122754ef4511af3139 /heap
parentef4290d569233d0cb4df6200538b75a0c7dca87b (diff)
downloadmariadb-git-47c921e364b223469d8dd3cc58ce452715b547c9.tar.gz
ctype_utf8.test:
Added a test case for bug #11484. hp_hash.c: Fixed bug #11484. This bug in the function hp_rec_key_cmp resulted in wrong comparison of varchar multibyte keys if the bytes after string values happened to be different. This caused wrong results for queries returning DISTINCT varchar fields in multibyte charsets (e.g. in utf8). heap/hp_hash.c: Fixed bug #11484. This bug in the function hp_rec_key_cmp resulted in wrong comparison of varchar multibyte keys if the bytes after string values happened to be different. This caused wrong results for queries returning DISTINCT varchar fields in multibyte charsets (e.g. in utf8). mysql-test/t/ctype_utf8.test: Added a test case for bug #11484.
Diffstat (limited to 'heap')
-rw-r--r--heap/hp_hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/heap/hp_hash.c b/heap/hp_hash.c
index 9e4636ebdc0..d643f776731 100644
--- a/heap/hp_hash.c
+++ b/heap/hp_hash.c
@@ -552,9 +552,9 @@ int hp_rec_key_cmp(HP_KEYDEF *keydef, const byte *rec1, const byte *rec2,
if (cs->mbmaxlen > 1)
{
uint char_length= seg->length / cs->mbmaxlen;
- char_length1= my_charpos(cs, pos1, pos1 + char_length1, char_length);
+ char_length1= my_charpos(cs, pos1, pos1 + char_length1, char_length1);
set_if_smaller(char_length1, seg->length);
- char_length2= my_charpos(cs, pos2, pos2 + char_length2, char_length);
+ char_length2= my_charpos(cs, pos2, pos2 + char_length2, char_length2);
set_if_smaller(char_length2, seg->length);
}