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

Got error 505 'Found data corruption.' from ROCKSDB on SELECT from table with composite PK

    XMLWordPrintable

Details

    • Can result in data loss

    Description

      INSTALL SONAME 'ha_rocksdb';
      CREATE TABLE t (c INT,c2 CHAR(1),PRIMARY KEY(c,c2)) ENGINE=RocksDB;
      BEGIN;
      INSERT INTO t VALUES (2,2);
      DELETE FROM t;
      INSERT INTO t VALUES (1,1);
      SELECT * FROM t WHERE c=1;
      

      Leads to:

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

      12.2.0-dbg>SELECT * FROM t WHERE c=1;
      ERROR 1296 (HY000): Got error 505 'Found data corruption.' from ROCKSDB
      

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

      2025-11-15 11:07:24 4 [ERROR] Got error 505 when reading table './test/t'
      

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed             
      CS  10.6   dbg  101125  759e3523e3d832b174cf0a612704da38b2557b40  GOT_ERROR|Got error 206|when reading table
      CS  10.6   opt  101125  759e3523e3d832b174cf0a612704da38b2557b40  GOT_ERROR|Got error 206|when reading table
      CS  10.11  dbg  101125  536cd151f0370216d9ba4c15f40c7037060972a5  GOT_ERROR|Got error 206|when reading table
      CS  10.11  opt  101125  536cd151f0370216d9ba4c15f40c7037060972a5  GOT_ERROR|Got error 206|when reading table
      CS  11.4   dbg  101125  a1bb5c94fda453baa99e57e3927eaa7cd3c8bafe  GOT_ERROR|Got error 206|when reading table
      CS  11.4   opt  101125  a1bb5c94fda453baa99e57e3927eaa7cd3c8bafe  GOT_ERROR|Got error 206|when reading table
      CS  11.8   dbg  101125  e0428264d0095472c015eb58c46be68ca1a320ee  GOT_ERROR|Got error 505|when reading table
      CS  11.8   opt  101125  e0428264d0095472c015eb58c46be68ca1a320ee  GOT_ERROR|Got error 505|when reading table
      CS  12.1   dbg  101125  ba00960fdaee67a4efff6866e31f446bf486a1c2  GOT_ERROR|Got error 505|when reading table
      CS  12.1   opt  101125  ba00960fdaee67a4efff6866e31f446bf486a1c2  GOT_ERROR|Got error 505|when reading table
      CS  12.2   dbg  101125  fd15fd2765b53d0c070dd01d86fb231024b8f284  GOT_ERROR|Got error 505|when reading table
      CS  12.2   opt  101125  fd15fd2765b53d0c070dd01d86fb231024b8f284  GOT_ERROR|Got error 505|when reading table
      ES  10.6   dbg  101125  f0d4d34fb0314b03fddb71fb9dbde372744a8c13  GOT_ERROR|Got error 206|when reading table
      ES  10.6   opt  101125  f0d4d34fb0314b03fddb71fb9dbde372744a8c13  GOT_ERROR|Got error 206|when reading table
      ES  11.4   dbg  101125  b81ec4b57a5ddce88b8e2b2d16b64625ffdaa0e6  GOT_ERROR|Got error 505|when reading table
      ES  11.4   opt  101125  b81ec4b57a5ddce88b8e2b2d16b64625ffdaa0e6  GOT_ERROR|Got error 505|when reading table
      ES  11.8   dbg  101125  db36e8fb3bcdae26dd0acdcb2b52f7f4eb014df6  GOT_ERROR|Got error 505|when reading table
      ES  11.8   opt  101125  db36e8fb3bcdae26dd0acdcb2b52f7f4eb014df6  GOT_ERROR|Got error 505|when reading table
      

      No UBSAN/ASAN issues observed. The testcase is MTR compatible and will give:

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

      mysqltest: At line 17: query 'SELECT * FROM t WHERE c=1' failed: ER_GET_ERRMSG (1296): Got error 505 'Found data corruption.' from ROCKSDB
      

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            Roel Roel Van de Paar
            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.