1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

MDEV-35922 Server crashes in mhnsw_read_first upon using vector key with views

This commit is contained in:
Sergei Golubchik
2025-02-03 12:08:10 +01:00
parent 69041af67d
commit 6fc75e0868
3 changed files with 25 additions and 2 deletions

View File

@@ -49,9 +49,9 @@ public:
double val_real() override;
Item *get_const_arg() const
{
if (args[0]->type() == Item::FIELD_ITEM && args[1]->const_item())
if (args[0]->real_item()->type() == Item::FIELD_ITEM && args[1]->const_item())
return args[1];
if (args[1]->type() == Item::FIELD_ITEM && args[0]->const_item())
if (args[1]->real_item()->type() == Item::FIELD_ITEM && args[0]->const_item())
return args[0];
return NULL;
}