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

InnoDB fails to merge the change buffer to ROW_FORMAT=COMPRESSED tables

    XMLWordPrintable

Details

    Description

      While testing MDEV-34830, mleich encountered a case where a ROW_FORMAT=COMPRESSED table is being recovered incorrectly in a multi-batch recovery.

      I can reproduce the corruption. Unfortunately, the data set is partially encrypted and a compressed copy of it would be too large to be attached in Jira. I even tried to reduce the archive by omitting some tables, but I could not get it below the 10MiB limit.

      $BUILD/sql/mariadbd --innodb-buffer-pool-size=5m --plugin-dir=$BUILD/plugin/file_key_management --plugin-load-add=file_key_management.so --innodb-page-size=4k --file-key-management-filename=/dev/shm/encryption_keys.txt --datadir /dev/shm/data
      

      10.6 2ed33f2fb660617aa39d4abb7e7383764e63ac8c

      2024-09-05 14:44:31 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=69313049,77981397
      2024-09-05 14:44:31 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-1a.ibd' with space ID 57. Another data file called ./test/t8.ibd exists with the same space ID.
      2024-09-05 14:44:31 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-25.ibd' with space ID 72. Another data file called ./test/t4.ibd exists with the same space ID.
      2024-09-05 14:44:31 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-25.ibd' with space ID 72. Another data file called ./test/t4.ibd exists with the same space ID.
      2024-09-05 14:44:31 0 [Note] InnoDB: Multi-batch recovery needed at LSN 71640495
      2024-09-05 14:44:31 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-25.ibd' with space ID 72. Another data file called ./test/t4.ibd exists with the same space ID.
      2024-09-05 14:44:31 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-1a.ibd' with space ID 57. Another data file called ./test/t8.ibd exists with the same space ID.
      2024-09-05 14:44:31 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-25.ibd' with space ID 76. Another data file called ./test/t5.ibd exists with the same space ID.
      2024-09-05 14:44:31 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-25.ibd' with space ID 76. Another data file called ./test/t5.ibd exists with the same space ID.
      2024-09-05 14:44:31 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-2a.ibd' with space ID 78. Another data file called ./test/t2.ibd exists with the same space ID.
      2024-09-05 14:44:31 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-2a.ibd' with space ID 78. Another data file called ./test/t2.ibd exists with the same space ID.
      2024-09-05 14:44:31 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-25.ibd' with space ID 76. Another data file called ./test/t5.ibd exists with the same space ID.
      2024-09-05 14:44:31 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-2a.ibd' with space ID 78. Another data file called ./test/t2.ibd exists with the same space ID.
      2024-09-05 14:44:32 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-1a.ibd' with space ID 57. Another data file called ./test/t8.ibd exists with the same space ID.
      2024-09-05 14:44:32 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-24.ibd' with space ID 71. Another data file called ./test/t7.ibd exists with the same space ID.
      2024-09-05 14:44:32 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-25.ibd' with space ID 72. Another data file called ./test/t4.ibd exists with the same space ID.
      2024-09-05 14:44:32 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-25.ibd' with space ID 72. Another data file called ./test/t4.ibd exists with the same space ID.
      2024-09-05 14:44:32 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-25.ibd' with space ID 72. Another data file called ./test/t4.ibd exists with the same space ID.
      2024-09-05 14:44:32 0 [Note] InnoDB: To recover: LSN 71968140/71983616; 641 pages
      2024-09-05 14:44:32 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-1a.ibd' with space ID 57. Another data file called ./test/t8.ibd exists with the same space ID.
      2024-09-05 14:44:32 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-25.ibd' with space ID 76. Another data file called ./test/t5.ibd exists with the same space ID.
      2024-09-05 14:44:32 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-25.ibd' with space ID 76. Another data file called ./test/t5.ibd exists with the same space ID.
      2024-09-05 14:44:32 0 [Note] InnoDB: To recover: LSN 74921892/74932736; 671 pages
      2024-09-05 14:44:33 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-2a.ibd' with space ID 78. Another data file called ./test/t2.ibd exists with the same space ID.
      2024-09-05 14:44:33 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-2a.ibd' with space ID 78. Another data file called ./test/t2.ibd exists with the same space ID.
      2024-09-05 14:44:33 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-25.ibd' with space ID 76. Another data file called ./test/t5.ibd exists with the same space ID.
      2024-09-05 14:44:33 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-2a.ibd' with space ID 78. Another data file called ./test/t2.ibd exists with the same space ID.
      2024-09-05 14:44:33 0 [Note] InnoDB: To recover: LSN 77424997/77439488; 688 pages
      2024-09-05 14:44:33 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-24.ibd' with space ID 71. Another data file called ./test/t7.ibd exists with the same space ID.
      2024-09-05 14:44:33 0 [Note] InnoDB: Ignoring data file './test/#sql-alter-cdb92-24.ibd' with space ID 71. Another data file called ./test/t7.ibd exists with the same space ID.
      2024-09-05 14:44:33 0 [Note] InnoDB: To recover: LSN 80025251/80044544; 691 pages
      2024-09-05 14:44:33 0 [Note] InnoDB: Opened 3 undo tablespaces
      2024-09-05 14:44:33 0 [Warning] InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces
      2024-09-05 14:44:33 0 [Note] InnoDB: To recover: 306 pages
      2024-09-05 14:44:33 0 [Note] InnoDB: Last binlog file './mysql-bin.000001', position 1698901
      2024-09-05 14:44:33 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
      2024-09-05 14:44:33 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
      2024-09-05 14:44:33 0 [Note] InnoDB: Creating shared tablespace for temporary tables
      2024-09-05 14:44:33 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
      2024-09-05 14:44:33 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
      2024-09-05 14:44:33 0 [Note] InnoDB: 10.6.20 started; log sequence number 81173989; transaction id 703
      2024-09-05 14:44:33 0 [Note] InnoDB: Loading buffer pool(s) from /dev/shm/data/ib_buffer_pool
      2024-09-05 14:44:33 0 [Note] Plugin 'FEEDBACK' is disabled.
      2024-09-05 14:44:33 0 [Note] InnoDB: Buffer pool(s) load completed at 240905 14:44:33
      2024-09-05 14:44:33 0 [Note] DDL_LOG: Crash recovery executed 8 entries
      2024-09-05 14:44:33 0 [Note] Server socket created on IP: '0.0.0.0'.
      2024-09-05 14:44:33 0 [Note] Server socket created on IP: '::'.
      2024-09-05 14:44:33 0 [Note] /mariadb/10.6/build/sql/mariadbd: ready for connections.
      Version: '10.6.20-MariaDB'  socket: '/dev/shm/murjutuupa'  port: 3306  Source distribution
      2024-09-05 14:44:34 3 [ERROR] InnoDB: Flagged corruption of `k` in table `test`.`t4` in CHECK TABLE; Wrong count
      

      If I start up the server on the same copy of the data directory with a larger innodb_buffer_pool_size, then CHECK TABLE will report no error.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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