diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2021-09-01 14:30:18 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2021-09-02 07:32:19 +0300 |
commit | f55477060c008dfef1f27768d5ce45d87f26af34 (patch) | |
tree | 6f3650edf341415f58a9a9a97df2c6defd86238a /storage/innobase | |
parent | 99f6a266c8b858d3b03c765a5952a30fc99450b6 (diff) | |
download | mariadb-git-f55477060c008dfef1f27768d5ce45d87f26af34.tar.gz |
MDEV-26518 ; Galera incorrectly handles primary or unique keys with any multi-byte character setbb-10.2-MDEV-26517
We need to set temporary buffer large enough to fit also multi-byte
characters.
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 00c9595aa87..c17bb219a72 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -6750,7 +6750,8 @@ wsrep_innobase_mysql_sort( // Note that strnxfrm may change length of string tmp_length= charset->coll->strnxfrmlen(charset, str_length); - tmp_length= ut_max(str_length, tmp_length) + 1; + tmp_length= tmp_length * charset->mbmaxlen; + tmp_length= ut_max(str_length, tmp_length) + charset->mbmaxlen; tmp_str= static_cast<uchar *>(ut_malloc_nokey(tmp_length)); ut_ad(str_length <= tmp_length); memcpy(tmp_str, str, str_length); |