mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
MDEV-35043 Unsuitable error upon an attempt to create MEMORY table with vector key
MEMORY engine doesn't support blobs
This commit is contained in:
parent
9f80e3fbb7
commit
824a63852b
3 changed files with 17 additions and 0 deletions
|
@ -39,3 +39,8 @@ set session mhnsw_max_edges_per_node = @@mhnsw_max_edges_per_node + 1;
|
||||||
create table t2 like t;
|
create table t2 like t;
|
||||||
alter table t force;
|
alter table t force;
|
||||||
drop table t, t2;
|
drop table t, t2;
|
||||||
|
#
|
||||||
|
# MDEV-35043 Unsuitable error upon an attempt to create MEMORY table with vector key
|
||||||
|
#
|
||||||
|
create table t (v binary(255) not null, vector index(v)) engine=memory;
|
||||||
|
ERROR HY000: Table storage engine 'MEMORY' does not support the create option 'VECTOR'
|
||||||
|
|
|
@ -41,3 +41,9 @@ set session mhnsw_max_edges_per_node = @@mhnsw_max_edges_per_node + 1;
|
||||||
create table t2 like t;
|
create table t2 like t;
|
||||||
alter table t force;
|
alter table t force;
|
||||||
drop table t, t2;
|
drop table t, t2;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-35043 Unsuitable error upon an attempt to create MEMORY table with vector key
|
||||||
|
--echo #
|
||||||
|
--error ER_ILLEGAL_HA_CREATE_OPTION
|
||||||
|
create table t (v binary(255) not null, vector index(v)) engine=memory;
|
||||||
|
|
|
@ -651,6 +651,12 @@ static int heap_prepare_hp_create_info(TABLE *table_arg, bool internal_table,
|
||||||
|
|
||||||
bzero(hp_create_info, sizeof(*hp_create_info));
|
bzero(hp_create_info, sizeof(*hp_create_info));
|
||||||
|
|
||||||
|
if (share->total_keys > keys)
|
||||||
|
{
|
||||||
|
my_error(ER_ILLEGAL_HA_CREATE_OPTION, MYF(0), "MEMORY", "VECTOR");
|
||||||
|
return HA_ERR_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
for (key= parts= 0; key < keys; key++)
|
for (key= parts= 0; key < keys; key++)
|
||||||
parts+= table_arg->key_info[key].user_defined_key_parts;
|
parts+= table_arg->key_info[key].user_defined_key_parts;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue