summaryrefslogtreecommitdiff
path: root/sql/key.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/key.cc')
-rw-r--r--sql/key.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/key.cc b/sql/key.cc
index 79f1c55b61c..d801bcc982b 100644
--- a/sql/key.cc
+++ b/sql/key.cc
@@ -611,7 +611,8 @@ int key_rec_cmp(void *key_p, uchar *first_rec, uchar *second_rec)
that take the max length into account.
*/
if ((result= field->cmp_prefix(field->ptr+first_diff, field->ptr+sec_diff,
- key_part->length)))
+ key_part->length /
+ field->charset()->mbmaxlen)))
DBUG_RETURN(result);
next_loop:
key_part++;