MDEV-35176 ASAN errors in Field_vector::store with optimizer_trace enabled

This commit is contained in:
Sergei Golubchik 2024-10-17 15:27:45 +02:00
parent 425aa95655
commit cfbf065893
3 changed files with 12 additions and 0 deletions

View file

@ -229,3 +229,8 @@ select hex(v) from t;
hex(v)
0000000000000000
drop table t;
#
# MDEV-35176 ASAN errors in Field_vector::store with optimizer_trace enabled
#
create table t (pk int primary key, v vector(2) not null, key(v(6)));
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys

View file

@ -174,3 +174,9 @@ create table t (v vector(2) not null);
insert ignore into t values (1);
select hex(v) from t;
drop table t;
--echo #
--echo # MDEV-35176 ASAN errors in Field_vector::store with optimizer_trace enabled
--echo #
--error ER_WRONG_SUB_KEY
create table t (pk int primary key, v vector(2) not null, key(v(6)));

View file

@ -26,6 +26,7 @@ public:
const Type_handler *type_handler_for_comparison() const override;
virtual Item *create_typecast_item(THD *thd, Item *item,
const Type_cast_attributes &attr) const override;
bool type_can_have_key_part() const override { return false; }
bool subquery_type_allows_materialization(const Item *, const Item *, bool)
const override
{