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?