MDEV-35215 ASAN errors in Item_func_vec_fromtext::val_str upon VEC_FROMTEXT with an invalid argument
This commit is contained in:
parent
96eb66e5b3
commit
1a53048299
Binary file not shown.
@ -64,3 +64,13 @@ select vec_fromtext(NULL);
|
||||
--echo #
|
||||
select vec_totext(0x77777777);
|
||||
select hex(vec_fromtext('[5.01922e33]'));
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35215 ASAN errors in Item_func_vec_fromtext::val_str upon VEC_FROMTEXT with an invalid argument
|
||||
--echo #
|
||||
create table t (v vector(1));
|
||||
insert into t values (vec_fromtext('[0.93]'));
|
||||
select vec_fromtext(v) from t;
|
||||
drop table t;
|
||||
|
||||
select vec_fromtext(0x00000000);
|
||||
|
@ -198,7 +198,7 @@ String *Item_func_vec_fromtext::val_str(String *buf)
|
||||
null_value= true;
|
||||
push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_TRUNCATED_WRONG_VALUE, ER(ER_TRUNCATED_WRONG_VALUE),
|
||||
"vector", value->ptr());
|
||||
"vector", value->c_ptr_safe());
|
||||
return nullptr;
|
||||
|
||||
error_format:
|
||||
@ -207,7 +207,7 @@ error_format:
|
||||
null_value= true;
|
||||
push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_VECTOR_FORMAT_INVALID, ER(ER_VECTOR_FORMAT_INVALID),
|
||||
position, value->ptr());
|
||||
position, value->c_ptr_safe());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user