在mysql客户端执行如下命令
use cloudpatrolmirror001;
CREATE TABLE everytableeverydup
(
ID
int(11) NOT NULL AUTO_INCREMENT,
AddTime
datetime(3) NOT NULL,
StatDay
varchar(10) COLLATE utf8mb4_bin GENERATED ALWAYS AS (substr(cast(AddTime
as char(30) charset utf8),1,10)) VIRTUAL,
StatTime
varchar(5) COLLATE utf8mb4_bin GENERATED ALWAYS AS (substr(cast(AddTime
as char(30) charset utf8),12,5)) VIRTUAL,
DB
varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,
tb
varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
RedundancyGroup
varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,
Rows
bigint(20) DEFAULT NULL,
DataSize
bigint(20) DEFAULT NULL,
IndexSize
bigint(20) DEFAULT NULL,
TotalSize
bigint(20) DEFAULT NULL,
MainCL
varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
BeHandled
smallint(6) DEFAULT NULL,
PRIMARY KEY (ID
,AddTime
)
) ENGINE=SEQUOIADB AUTO_INCREMENT=2254001 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='表格的分布式存储,sequoiadb:{ table_options: { ShardingKey: { AddTime: 1 }, ShardingType: ''range'',Group:''DataGroup3'',IsMainCL:true} }';
Query OK, 0 rows affected (0.01 sec)
显示执行成功。
然后执行如下命令:
use cloudpatrol;
CREATE TABLE everytableeverydup
(
ID
int(11) NOT NULL AUTO_INCREMENT,
AddTime
datetime(3) NOT NULL,
StatDay
varchar(10) COLLATE utf8mb4_bin GENERATED ALWAYS AS (substr(cast(AddTime
as char(30) charset utf8),1,10)) VIRTUAL,
StatTime
varchar(5) COLLATE utf8mb4_bin GENERATED ALWAYS AS (substr(cast(AddTime
as char(30) charset utf8),12,5)) VIRTUAL,
DB
varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,
tb
varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
RedundancyGroup
varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,
Rows
bigint(20) DEFAULT NULL,
DataSize
bigint(20) DEFAULT NULL,
IndexSize
bigint(20) DEFAULT NULL,
TotalSize
bigint(20) DEFAULT NULL,
MainCL
varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
BeHandled
smallint(6) DEFAULT NULL,
PRIMARY KEY (ID
,AddTime
)
) COMMENT='sequoiadb:{mapping: "cloudpatrolmirror001.everytableeverydup"}';
出现如下错误信息
ERROR 1210 (HY000): Invalid comment option 'mapping'.
请问巨杉的工程师们,是哪里出现了问题?