diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-07-24 17:43:10 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-07-29 14:56:24 +0200 |
commit | 0b5b2f864153bf236a844e225ed6f04d79c757d8 (patch) | |
tree | 775b7ba966f61c99fa569cf95879ef98ea63c80f /sql/key.cc | |
parent | d5970779fac361a9ba56fccf0e9ed5b492b17d7e (diff) | |
download | mariadb-git-0b5b2f864153bf236a844e225ed6f04d79c757d8.tar.gz |
Bug #25207522: INCORRECT ORDER-BY BEHAVIOR ON A PARTITIONED TABLE WITH A COMPOSITE PREFIX INDEX
Fix prefix key comparison in partitioning. Comparions must
take into account no more than prefix_len characters.
It used to compare prefix_len*mbmaxlen bytes.
Diffstat (limited to 'sql/key.cc')
-rw-r--r-- | sql/key.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/key.cc b/sql/key.cc index 013733db62a..9b09387885b 100644 --- a/sql/key.cc +++ b/sql/key.cc @@ -623,8 +623,8 @@ int key_rec_cmp(void *key_p, uchar *first_rec, uchar *second_rec) max length. The exceptions are the BLOB and VARCHAR field types that take the max length into account. */ - if ((result= field->cmp_max(field->ptr+first_diff, field->ptr+sec_diff, - key_part->length))) + if ((result= field->cmp_prefix(field->ptr+first_diff, field->ptr+sec_diff, + key_part->length))) DBUG_RETURN(result); next_loop: key_part++; |