MDEV-35919 Server crashes in Item_func_vec_distance::fix_length_and_dec upon reading from I_S table

This commit is contained in:
Sergei Golubchik 2025-02-05 17:26:32 +01:00
commit 9799777992
3 changed files with 13 additions and 0 deletions

View file

@ -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++)