Skip to content

Commit 8988dec

Browse files
committed
MDEV-35220 Assertion `!item->null_value' failed upon VEC_TOTEXT call
don't forget to reset null_value for each row
1 parent 14364b0 commit 8988dec

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

mysql-test/main/vector_funcs.result

166 Bytes
Binary file not shown.

mysql-test/main/vector_funcs.test

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,8 @@ select vec_fromtext(v) from t;
7474
drop table t;
7575

7676
select vec_fromtext(0x00000000);
77+
78+
--echo #
79+
--echo # MDEV-35220 Assertion `!item->null_value' failed upon VEC_TOTEXT call
80+
--echo #
81+
select vec_totext(`null`) from (values (null),(0x00000000)) x;

sql/item_vectorfunc.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,8 @@ bool Item_func_vec_totext::fix_length_and_dec(THD *thd)
6565
String *Item_func_vec_totext::val_str_ascii(String *str)
6666
{
6767
String *r1= args[0]->val_str();
68-
if (args[0]->null_value)
69-
{
70-
null_value= true;
68+
if ((null_value= args[0]->null_value))
7169
return nullptr;
72-
}
7370

7471
// Wrong size returns null
7572
if (r1->length() % 4)

0 commit comments

Comments
 (0)