Quantcast
Channel: MySQL Forums - NDB clusters
Viewing all articles
Browse latest Browse all 1562

can't add composite index in ndb table (3 replies)

$
0
0
hello all:

I add a composite index to a ndb table ,something wrong happent ,the wrong message is "Error Code: 1005 Can't create table 'tuge.#sql-d70_1454bb' (errno: 906)" or "Error Code: 1005 Can't create table 'tuge.#sql-d70_1454bb' (errno: 4247)"
I use command "perror --ndb 906" to see what wrong ,is said that "NDB error code 906: Unsupported attribute type in index: Permanent error: Schema error", and I use command "perror --ndb 4247" ,it said that "NDB error code 4247: Illegal index/trigger create/drop/alter request: Permanent error: Application error". so did someone know what wrong ,is that ndb not support composite index ?

how to reappear 906 error code:
CREATE TABLE `tuge_customer_relation` (
`RecordID` VARCHAR(36) NOT NULL DEFAULT 'uuid()',
`PartnerTenantCode` VARCHAR(20) NOT NULL COMMENT '伙伴TenantCode',
`RelatedTenantCode` VARCHAR(20) NOT NULL COMMENT '相关客户TenantCode',
`Remark` TEXT COMMENT '备注',
`CreateDate` TIMESTAMP NULL DEFAULT NULL COMMENT '创建日期',
`CreateUserCode` VARCHAR(20) DEFAULT NULL COMMENT '创建者编码',
`IsAbolish` BIT(1) DEFAULT NULL COMMENT '是否废除',
PRIMARY KEY (`RecordID`),
KEY `IX_RelatedTenantCode` (`RelatedTenantCode`)
) TABLESPACE ts_1 STORAGE DISK ENGINE=NDBCLUSTER DEFAULT CHARSET=utf8;

ALTER TABLE tuge_customer_relation ADD INDEX aaa(`PartnerTenantCode`,`IsAbolish`);

how to reappear 4247 error code:
CREATE TABLE `datasource` (
`Name` VARCHAR(50) NOT NULL,
`ProviderName` VARCHAR(200) NOT NULL,
`TablePrefix` VARCHAR(50) DEFAULT NULL,
`Address` VARCHAR(50) NOT NULL,
`Catalog` VARCHAR(50) NOT NULL,
`UserID` VARCHAR(50) NOT NULL,
`Password` VARCHAR(50) NOT NULL,
`Port` INT(10) UNSIGNED DEFAULT '3306' COMMENT '端口',
PRIMARY KEY (`Name`)
) TABLESPACE ts_1 STORAGE DISK ENGINE=NDBCLUSTER DEFAULT CHARSET=utf8;

ALTER TABLE datasource ADD INDEX aaaa (`ProviderName`,`TablePrefix`);

Viewing all articles
Browse latest Browse all 1562

Trending Articles