MDEV-35220 Assertion `!item->null_value' failed upon VEC_TOTEXT call

don't forget to reset null_value for each row
This commit is contained in:
Sergei Golubchik 2024-10-23 17:07:17 +02:00
parent 14364b09b9
commit 8988decbfe
3 changed files with 6 additions and 4 deletions

Binary file not shown.

View File

@ -74,3 +74,8 @@ select vec_fromtext(v) from t;
drop table t;
select vec_fromtext(0x00000000);
--echo #
--echo # MDEV-35220 Assertion `!item->null_value' failed upon VEC_TOTEXT call
--echo #
select vec_totext(`null`) from (values (null),(0x00000000)) x;

View File

@ -65,11 +65,8 @@ bool Item_func_vec_totext::fix_length_and_dec(THD *thd)
String *Item_func_vec_totext::val_str_ascii(String *str)
{
String *r1= args[0]->val_str();
if (args[0]->null_value)
{
null_value= true;
if ((null_value= args[0]->null_value))
return nullptr;
}
// Wrong size returns null
if (r1->length() % 4)