diff options
author | Alexander Barkov <bar@mariadb.com> | 2021-10-10 18:42:32 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2021-10-11 17:01:47 +0400 |
commit | 9300b6657752e566a3c72da7ca6eaa8ee052e4e1 (patch) | |
tree | 34429cd3609fd0311500a59141178db6ec450dc0 /sql/item_strfunc.cc | |
parent | 5e3e5ccbea2ab90548fc82c5d730dea2c9315a16 (diff) | |
download | mariadb-git-9300b6657752e566a3c72da7ca6eaa8ee052e4e1.tar.gz |
MDEV-24742 Server crashes in Charset::numchars / String::numcharsbb-10.2-bar-MDEV-24742
The crash happened because Item_aes_crypt::val_str() did not
set the character set of the result.
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 26a23b0cb55..e5935178f10 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -338,6 +338,8 @@ String *Item_aes_crypt::val_str(String *str2) rkey, AES_KEY_LENGTH / 8, 0, 0)) { str2->length((uint) aes_length); + DBUG_ASSERT(collation.collation == &my_charset_bin); + str2->set_charset(&my_charset_bin); return str2; } } |