summaryrefslogtreecommitdiff
path: root/heap
diff options
context:
space:
mode:
authorunknown <gluh@mysql.com>2005-05-09 16:22:49 +0000
committerunknown <gluh@mysql.com>2005-05-09 16:22:49 +0000
commit37dc7c80a5e0e6436ae2ee4a39f2b11ff1e32e4f (patch)
treea45c1df968541c9eb9aad9f95af0f3d89804be1c /heap
parent28bbc467cf0e2fc7490eee7d9fb88845f1d21053 (diff)
downloadmariadb-git-37dc7c80a5e0e6436ae2ee4a39f2b11ff1e32e4f.tar.gz
Fix for bug #9404: information_schema: Weird error messages with SELECT SUM() ... GROUP BY queries
heap/hp_hash.c: Fix for bug #9404: information_schema: Weird error messages with SELECT SUM() ... GROUP BY queries use length in symbols instead of length in bytes to calculate record length and key length
Diffstat (limited to 'heap')
-rw-r--r--heap/hp_hash.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/heap/hp_hash.c b/heap/hp_hash.c
index 52a250bd7af..7f02eb587a8 100644
--- a/heap/hp_hash.c
+++ b/heap/hp_hash.c
@@ -635,13 +635,12 @@ int hp_key_cmp(HP_KEYDEF *keydef, const byte *rec, const byte *key)
key+= 2; /* skip key pack length */
if (cs->mbmaxlen > 1)
{
- uint char_length= seg->length / cs->mbmaxlen;
- char_length_key= my_charpos(cs, key, key + char_length_key,
- char_length);
- set_if_smaller(char_length_key, seg->length);
- char_length_rec= my_charpos(cs, pos, pos + char_length_rec,
- char_length);
- set_if_smaller(char_length_rec, seg->length);
+ uint char_length1, char_length2;
+ char_length1= char_length2= seg->length / cs->mbmaxlen;
+ char_length1= my_charpos(cs, key, key + char_length_key, char_length1);
+ set_if_smaller(char_length_key, char_length1);
+ char_length2= my_charpos(cs, pos, pos + char_length_rec, char_length2);
+ set_if_smaller(char_length_rec, char_length2);
}
if (cs->coll->strnncollsp(seg->charset,