mirror of
https://github.com/MariaDB/server.git
synced 2025-12-28 08:10:14 +00:00
MDEV-35919 Server crashes in Item_func_vec_distance::fix_length_and_dec upon reading from I_S table
This commit is contained in:
parent
49821f21ce
commit
9799777992
@ -260,4 +260,9 @@ x
|
||||
2222
|
||||
drop view v;
|
||||
drop table t;
|
||||
#
|
||||
# MDEV-35919 Server crashes in Item_func_vec_distance::fix_length_and_dec upon reading from I_S table
|
||||
#
|
||||
select vec_distance(value(key_cache_name), 0x30303030) from information_schema.key_caches;
|
||||
ERROR HY000: Cannot determine distance type for VEC_DISTANCE, index is not found
|
||||
# End of 11.8 tests
|
||||
|
||||
@ -147,4 +147,10 @@ select * from v order by vec_distance(0x30303030, x);
|
||||
drop view v;
|
||||
drop table t;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35919 Server crashes in Item_func_vec_distance::fix_length_and_dec upon reading from I_S table
|
||||
--echo #
|
||||
--error ER_VEC_DISTANCE_TYPE
|
||||
select vec_distance(value(key_cache_name), 0x30303030) from information_schema.key_caches;
|
||||
|
||||
--echo # End of 11.8 tests
|
||||
|
||||
@ -64,6 +64,8 @@ bool Item_func_vec_distance::fix_length_and_dec(THD *thd)
|
||||
if (auto *item= dynamic_cast<Item_field*>(args[i]->real_item()))
|
||||
{
|
||||
TABLE_SHARE *share= item->field->orig_table->s;
|
||||
if (share->tmp_table)
|
||||
break;
|
||||
Field *f= share->field[item->field->field_index];
|
||||
KEY *kinfo= share->key_info;
|
||||
for (uint j= share->keys; j < share->total_keys; j++)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user