最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

indexing - MariaDB with Aria engine - Corrupted index due to non-unique values - Stack Overflow

programmeradmin4浏览0评论

In MariaDB (10.6.15 winx64) I create a table with Aria engine. The table creation works fine and so do the insert statements. However, as soon as I try to update selected rows, I run into an error (126 "Index is corrupted"):

DROP TABLE IF EXISTS tbl;
CREATE TABLE tbl  (
`id` int(11) NOT NULL AUTO_INCREMENT,
`isin` binary(12) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `isin`(`isin`) USING BTREE
) ENGINE = Aria CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = PAGE TRANSACTIONAL = 1;

INSERT INTO tbl (isin) VALUES('DE0007236101');
INSERT INTO tbl (isin) VALUES('CH0024899485');
INSERT INTO tbl (isin) VALUES('DE0007236101');

UPDATE tbl SET isin = 'CH0024899486' WHERE isin = 'DE0007236101';

It works fine with InnoDB and MyISAM. It also works fine with Aria as long as I do not insert any duplicate values in column isin.

What is wrong with what I am trying to do? How does Aria run into a problem while MyISAM doesn't?

发布评论

评论列表(0)

  1. 暂无评论