功能"分片表的外部(非分片)键"不受单一存储支持



我试图在SingleStore MemSQL:中创建一个带有引用表外键的表

-- Create table
create rowstore reference table DEPT
(
deptno INT(2) not null,
dname VARCHAR(14),
loc VARCHAR(13),
constraint PK_DEPT primary key (DEPTNO)
); 
create rowstore table EMP
(
empno INT(4) not null,
ename VARCHAR(10),
job  VARCHAR(9),
mgr  INT(4),
hiredate DATE,
sal  decimal(7,2),
comm  decimal(7,2),
deptno INT(2),
constraint PK_EMP primary key (EMPNO)
,constraint FK_DEPTNO foreign key (DEPTNO) references DEPT (DEPTNO)
);

但这失败了:

ERROR 1706 ER_MEMSQL_FEATURE_LOCKDOWN: Feature 'FOREIGN (non-SHARD) key to a sharded table' is not supported by SingleStore.

消息说,相反的情况是不可能的(共享表的外键(,但在这里,我尝试创建一个从分片表到引用表的外键。即使在不支持分布式事务的情况下,这也是可能的,因为这是一个单一的碎片验证。

外键当前不是SingleStoreDB上支持的功能。

https://docs.singlestore.com/managed-service/en/developer-resources/unsupported-mysql-features/unsupported-feature-list.html

最新更新