diff options
author | Alexander Barkov <bar@mariadb.com> | 2021-11-02 16:02:56 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2022-01-27 09:44:11 +0400 |
commit | 3d69213e74f66fb3e5253d68853d7132bc76cf55 (patch) | |
tree | 2aac72344d2654bae75d2f015d1ef305f231d945 /support-files | |
parent | 4775677457b501b40714c74e5867ac83cfa4906d (diff) | |
download | mariadb-git-3d69213e74f66fb3e5253d68853d7132bc76cf55.tar.gz |
MDEV-26953 Assertion `!str || str != Ptr || !is_alloced()' failed in String::copy upon SELECT with sjis
Item::save_str_in_field() passes &Item::str_value as a parameter
to val_str().
Item_func::make_empty_result() also fills and returns str_value.
As a result, in the reported scenario in
Item_func::val_str_from_val_str_ascii()
both "str" and "res" pointed to Item::str_value,
which made the DBUG_ASSERT inside String::copy()
(preventing copying to itself) crash:
if ((null_value= str->copy(res->ptr(), res->length(),
&my_charset_latin1, collation.collation,
&errors)))
Fix:
- Adding a String* parameter to make_empty_result()
- Passing the val_str() parameter to make_empty_string().
Diffstat (limited to 'support-files')
0 files changed, 0 insertions, 0 deletions