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

Aria: Errors 1034 and 145 table corruption, "2 clients are using or haven't closed the table properly", [ERROR] mariadbd: Incorrect information in file: './test/t.frm', Couldn't repair table: test.t

    XMLWordPrintable

Details

    • Can result in data loss

    Description

      CREATE TABLE t (a INT,b INT GENERATED ALWAYS AS (a) VIRTUAL) ENGINE=Aria;
      SET max_session_mem_used=8192;
      INSERT INTO t VALUES (0);
      LOCK TABLES t WRITE;
      TRUNCATE TABLE t;
      INSERT INTO t VALUES (0);
      LOCK TABLES t WRITE;
      SET max_session_mem_used=128*8192;
      CHECK TABLE t;
      

      Leads to:

      CS 12.2.0 fd15fd2765b53d0c070dd01d86fb231024b8f284 (Debug, Clang 21.1.3-20250923) Build 10/11/2025

      12.2.0-dbg>LOCK TABLES t WRITE;
      ERROR 1034 (HY000): Index for table 't' is corrupt; try to repair it
      12.2.0-dbg>SET max_session_mem_used=128*8192;
      Query OK, 0 rows affected (0.000 sec)
       
      12.2.0-dbg>CHECK TABLE t;
      +--------+-------+----------+----------------------------------------------------------+
      | Table  | Op    | Msg_type | Msg_text                                                 |
      +--------+-------+----------+----------------------------------------------------------+
      | test.t | check | warning  | 2 clients are using or haven't closed the table properly |
      | test.t | check | status   | OK                                                       |
      +--------+-------+----------+----------------------------------------------------------+
      2 rows in set (0.001 sec)  
      

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed             
      CS  10.6   dbg  101125  759e3523e3d832b174cf0a612704da38b2557b40  GOT_ERROR|Got error '145 "Table was marked as crashed and should be repaired" for 'X'
      CS  10.6   opt  101125  759e3523e3d832b174cf0a612704da38b2557b40  GOT_ERROR|Got error '145 "Table was marked as crashed and should be repaired" for 'X'
      CS  10.11  dbg  101125  536cd151f0370216d9ba4c15f40c7037060972a5  GOT_ERROR|Got error '145 "Table was marked as crashed and should be repaired" for 'X'
      CS  10.11  opt  101125  536cd151f0370216d9ba4c15f40c7037060972a5  GOT_ERROR|Got error '145 "Table was marked as crashed and should be repaired" for 'X'
      CS  11.4   dbg  101125  a1bb5c94fda453baa99e57e3927eaa7cd3c8bafe  GOT_ERROR|Got error '145 "Table was marked as crashed and should be repaired" for 'X'
      CS  11.4   opt  101125  a1bb5c94fda453baa99e57e3927eaa7cd3c8bafe  GOT_ERROR|Got error '145 "Table was marked as crashed and should be repaired" for 'X'
      CS  11.8   dbg  101125  e0428264d0095472c015eb58c46be68ca1a320ee  GOT_ERROR|Got error '145 "Table was marked as crashed and should be repaired" for 'X'
      CS  11.8   opt  101125  e0428264d0095472c015eb58c46be68ca1a320ee  GOT_ERROR|Got error '145 "Table was marked as crashed and should be repaired" for 'X'
      CS  12.1   dbg  101125  ba00960fdaee67a4efff6866e31f446bf486a1c2  GOT_ERROR|Got error '145 "Table was marked as crashed and should be repaired" for 'X'
      CS  12.1   opt  101125  ba00960fdaee67a4efff6866e31f446bf486a1c2  GOT_ERROR|Got error '145 "Table was marked as crashed and should be repaired" for 'X'
      CS  12.2   dbg  101125  fd15fd2765b53d0c070dd01d86fb231024b8f284  GOT_ERROR|Got error '145 "Table was marked as crashed and should be repaired" for 'X'
      CS  12.2   opt  101125  fd15fd2765b53d0c070dd01d86fb231024b8f284  GOT_ERROR|Got error '145 "Table was marked as crashed and should be repaired" for 'X'
      CS  12.3   dbg  091225  e85bc659188be021897e8578aec42becfbb58c27  GOT_ERROR|Got error '145 "Table was marked as crashed and should be repaired" for 'X'
      CS  12.3   opt  091225  e85bc659188be021897e8578aec42becfbb58c27  GOT_ERROR|Got error '145 "Table was marked as crashed and should be repaired" for 'X'
      ES  10.6   dbg  101125  f0d4d34fb0314b03fddb71fb9dbde372744a8c13  No bug found                  
      ES  10.6   opt  101125  f0d4d34fb0314b03fddb71fb9dbde372744a8c13  No bug found                  
      ES  11.4   dbg  101125  b81ec4b57a5ddce88b8e2b2d16b64625ffdaa0e6  No bug found                  
      ES  11.4   opt  101125  b81ec4b57a5ddce88b8e2b2d16b64625ffdaa0e6  No bug found                  
      ES  11.8   dbg  101125  db36e8fb3bcdae26dd0acdcb2b52f7f4eb014df6  No bug found                  
      ES  11.8   opt  101125  db36e8fb3bcdae26dd0acdcb2b52f7f4eb014df6  No bug found                               
      

      Attachments

        Activity

          People

            monty Michael Widenius
            Roel Roel Van de Paar
            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.