Commit a059f514 authored by Sergey Vojtovich's avatar Sergey Vojtovich Committed by Sergei Golubchik

Disable VECTOR indexes with partitioned tables

parent 3edaeafc
# Vector indexes do not support partitioned tables
create table t1 (id int auto_increment primary key,
v blob not null, vector index (v))
partition by key(id) partitions 2;
ERROR HY000: Partitioned tables do not support VECTOR
create table t1 (id int auto_increment primary key,
v blob not null)
partition by key(id) partitions 2;
alter table t1 add vector index(v);
ERROR HY000: Partitioned tables do not support VECTOR
create vector index i on t1(v);
ERROR HY000: Partitioned tables do not support VECTOR
drop table t1;
create table t1 (id int auto_increment primary key,
v blob not null, vector index(v));
alter table t1 partition by key(id) partitions 2;
ERROR HY000: Partitioned tables do not support VECTOR
drop table t1;
db.opt
--source include/have_partition.inc
--echo # Vector indexes do not support partitioned tables
--error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING
create table t1 (id int auto_increment primary key,
v blob not null, vector index (v))
partition by key(id) partitions 2;
create table t1 (id int auto_increment primary key,
v blob not null)
partition by key(id) partitions 2;
--error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING
alter table t1 add vector index(v);
--error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING
create vector index i on t1(v);
drop table t1;
create table t1 (id int auto_increment primary key,
v blob not null, vector index(v));
--error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING
alter table t1 partition by key(id) partitions 2;
drop table t1;
let $datadir=`select @@datadir`;
list_files $datadir/test;
...@@ -3244,6 +3244,11 @@ mysql_prepare_create_table_finalize(THD *thd, HA_CREATE_INFO *create_info, ...@@ -3244,6 +3244,11 @@ mysql_prepare_create_table_finalize(THD *thd, HA_CREATE_INFO *create_info,
key_number--; // Skip this key key_number--; // Skip this key
continue; continue;
case Key::VECTOR: case Key::VECTOR:
if (thd->work_part_info)
{
my_error(ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING, MYF(0), "VECTOR");
DBUG_RETURN(TRUE);
}
if (key->key_create_info.algorithm == HA_KEY_ALG_UNDEF) if (key->key_create_info.algorithm == HA_KEY_ALG_UNDEF)
key->key_create_info.algorithm= HA_KEY_ALG_VECTOR; key->key_create_info.algorithm= HA_KEY_ALG_VECTOR;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment