mirror of
https://github.com/MariaDB/server.git
synced 2025-03-29 18:35:35 +01:00
MDEV-36011 Server crashes in Charset::mbminlen / Item_func_vec_fromtext::val_str upon mixing vector type with string
This commit is contained in:
parent
6fc75e0868
commit
a2f0234c82
3 changed files with 8 additions and 0 deletions
Binary file not shown.
|
@ -79,3 +79,10 @@ select vec_fromtext(0x00000000);
|
|||
--echo # MDEV-35220 Assertion `!item->null_value' failed upon VEC_TOTEXT call
|
||||
--echo #
|
||||
select vec_totext(`null`) from (values (null),(0x00000000)) x;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-36011 Server crashes in Charset::mbminlen / Item_func_vec_fromtext::val_str upon mixing vector type with string
|
||||
--echo #
|
||||
select 0x31313131 in ('1111', vec_fromtext('[1]'));
|
||||
|
||||
--echo # End of 11. tests
|
||||
|
|
|
@ -142,6 +142,7 @@ String *Item_func_vec_fromtext::val_str(String *buf)
|
|||
return nullptr;
|
||||
|
||||
buf->length(0);
|
||||
buf->set_charset(&my_charset_bin);
|
||||
CHARSET_INFO *cs= value->charset();
|
||||
const uchar *start= reinterpret_cast<const uchar *>(value->ptr());
|
||||
const uchar *end= start + value->length();
|
||||
|
|
Loading…
Add table
Reference in a new issue