Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-31682

CHAR in Aria index crashes index on UPDATE

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.11.4
    • None
    • Windows 10 (22H2) & Windows Server 2022 (21H2)

    Description

      Running this query crashes the index (with "'126 "Index is corrupted"' for '.\mydb\t.MAI'") on 10.11.3 and 10.11.4.

       
      -- Pre-Clean up
      DROP TABLE if exists t;
       
      CREATE TABLE `t` (
      	`id` INT(10) NOT NULL AUTO_INCREMENT,
      	`Source` CHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb3_bin',
      	`SourceId` CHAR(10) NULL DEFAULT NULL COLLATE 'utf8mb3_bin',
      	`DeleteStamp` DATETIME(3) NULL DEFAULT NULL,
      	PRIMARY KEY (`id`) USING BTREE,
      	INDEX `Full` (`SourceId`, `Source`, `DeleteStamp`) USING BTREE
      )
      COLLATE='utf8mb3_bin'
      ENGINE=Aria
      AUTO_INCREMENT=2537655
      ;
       
      INSERT INTO t (SOURCE, sourceid) VALUES ('abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNO', '123456');
      INSERT INTO t (SOURCE, sourceid) VALUES ('abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNO', '123456');
      INSERT INTO t (SOURCE, sourceid) VALUES ('abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNO', '123456');
      INSERT INTO t (SOURCE, sourceid) VALUES ('abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNO', '123456');
      INSERT INTO t (SOURCE, sourceid) VALUES ('abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNO', '123456');
      INSERT INTO t (SOURCE, sourceid) VALUES ('abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNO', '123456');
      INSERT INTO t (SOURCE, sourceid) VALUES ('abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNO', '123456');
      INSERT INTO t (SOURCE, sourceid) VALUES ('abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNO', '123456');
      INSERT INTO t (SOURCE, sourceid) VALUES ('abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNO', '123456');
      INSERT INTO t (SOURCE, sourceid) VALUES ('abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNO', '123456');
       
      -- [ERROR] mysqld.exe: Got error '126 "Index is corrupted"' for '.\mydb\t.MAI'
      UPDATE t SET DeleteStamp = NOW();
       
      -- Clean up
      DROP TABLE t;
      
      

      I've ran the query several times on version 10.4.11 without any issues.

      • With (much?) more data the index crashes also when doing insert and delete.
      • Increasing the length of both CHAR fields will solve the crash.
      • Replacing CHAR with VARCHAR will solve the crash.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              emilsteen Emil Steen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.