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

Server shows table corruption error when reading rows using HANDLER statement

    XMLWordPrintable

Details

    Description

      --source include/have_sequence.inc 
       
      CREATE  TABLE t1(c1 TEXT) ENGINE=ARIA;
      INSERT INTO t1 SELECT concat(seq,'wDizlix4sTUxibINhJmaznYGOnpMYF') FROM seq_1_to_100;
      HANDLER t1 OPEN;
      UPDATE t1 SET c1=REPEAT('a',120);
      DELETE FROM t1 LIMIT 50;
      HANDLER t1 READ NEXT;
      DELETE FROM t1 LIMIT 25;
      HANDLER t1 READ NEXT;
      

      Leads to:

      11.6.0 42294b8cd2cbb72c1d5da6058dd6f0c55669def7 (Optimized)

      ==============================================================================
       
      TEST                                      RESULT   TIME (ms) or COMMENT
      --------------------------------------------------------------------------
       
      worker[01] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
      CREATE OR REPLACE TABLE t1(c1 TEXT) ENGINE=ARIA;
      INSERT INTO t1 SELECT concat(seq,'wDizlix4sTUxibINhJmaznYGOnpMYF') FROM seq_1_to_100;
      HANDLER t1 OPEN;
      UPDATE t1 SET c1=REPEAT('a',120);
      DELETE FROM t1 LIMIT 50;
      HANDLER t1 READ NEXT;
      c1
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
      DELETE FROM t1 LIMIT 25;
      HANDLER t1 READ NEXT;
      main.mytest                              [ fail ]
              Test ended at 2024-06-27 09:31:23
       
      CURRENT_TEST: main.mytest
      mysqltest: At line 10: query 'HANDLER t1 READ NEXT' failed: HA_ERR_WRONG_IN_RECORD (127): Got error '127 "Table file is corrupted"' for './test/t1.MAI'
       
      Error log
      2024-06-27  9:25:50 4 [ERROR] mariadbd: Got error '127 "Table file is corrupted"' for './test/t1.MAI'
      2024-06-27  9:25:50 4 [ERROR] mysql_ha_read: Got error 127 when reading table 't1'
      2024-06-27  9:25:50 4 [ERROR] mariadbd: Table 't1' is marked as crashed and should be repaired
      

      Bug confirmed present in:
      MariaDB: 10.5.26 (dbg), 10.5.26 (opt), 10.6.18 (dbg), 10.6.18 (opt), 10.11.8 (dbg), 10.11.8 (opt), 11.1.5 (dbg), 11.1.5 (opt), 11.2.4 (dbg), 11.2.4 (opt), 11.4.2 (dbg), 11.4.2 (opt), 11.5.1 (dbg), 11.5.1 (opt),11.6.0 (dbg), 11.6.0 (opt)

      Attachments

        Activity

          People

            monty Michael Widenius
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.