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.
{"report":{"fcp":3888.5,"ttfb":1612.8000001907349,"pageVisibility":"visible","entityId":130628,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"c79791f1-b712-44c9-b2e7-bd2801f46ac0","navigationType":0,"readyForUser":3988.7000000476837,"redirectCount":0,"resourceLoadedEnd":4946.800000190735,"resourceLoadedStart":1618.4000000953674,"resourceTiming":[{"duration":1783.2000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":1618.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1618.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3401.600000143051,"responseStart":0,"secureConnectionStart":0},{"duration":1783.2999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1618.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1618.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3402,"responseStart":0,"secureConnectionStart":0},{"duration":1793.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":1618.8000001907349,"connectEnd":1618.8000001907349,"connectStart":1618.8000001907349,"domainLookupEnd":1618.8000001907349,"domainLookupStart":1618.8000001907349,"fetchStart":1618.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1618.8000001907349,"responseEnd":3412.300000190735,"responseStart":3412.300000190735,"secureConnectionStart":1618.8000001907349},{"duration":1859.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":1619,"connectEnd":1619,"connectStart":1619,"domainLookupEnd":1619,"domainLookupStart":1619,"fetchStart":1619,"redirectEnd":0,"redirectStart":0,"requestStart":1619,"responseEnd":3478.7000000476837,"responseStart":3478.7000000476837,"secureConnectionStart":1619},{"duration":1863.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":1619.3000001907349,"connectEnd":1619.3000001907349,"connectStart":1619.3000001907349,"domainLookupEnd":1619.3000001907349,"domainLookupStart":1619.3000001907349,"fetchStart":1619.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1619.3000001907349,"responseEnd":3483.100000143051,"responseStart":3483.100000143051,"secureConnectionStart":1619.3000001907349},{"duration":1864.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":1619.4000000953674,"connectEnd":1619.4000000953674,"connectStart":1619.4000000953674,"domainLookupEnd":1619.4000000953674,"domainLookupStart":1619.4000000953674,"fetchStart":1619.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1619.4000000953674,"responseEnd":3483.5,"responseStart":3483.5,"secureConnectionStart":1619.4000000953674},{"duration":1864.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":1619.6000001430511,"connectEnd":1619.6000001430511,"connectStart":1619.6000001430511,"domainLookupEnd":1619.6000001430511,"domainLookupStart":1619.6000001430511,"fetchStart":1619.6000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":1619.6000001430511,"responseEnd":3483.9000000953674,"responseStart":3483.9000000953674,"secureConnectionStart":1619.6000001430511},{"duration":1937.8999998569489,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":1619.8000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1619.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3557.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":1864.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":1620,"connectEnd":1620,"connectStart":1620,"domainLookupEnd":1620,"domainLookupStart":1620,"fetchStart":1620,"redirectEnd":0,"redirectStart":0,"requestStart":1620,"responseEnd":3484.5,"responseStart":3484.5,"secureConnectionStart":1620},{"duration":1937.7999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":1620.1000001430511,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1620.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3557.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":1864.9000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":1620.2000000476837,"connectEnd":1620.2000000476837,"connectStart":1620.2000000476837,"domainLookupEnd":1620.2000000476837,"domainLookupStart":1620.2000000476837,"fetchStart":1620.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1620.2000000476837,"responseEnd":3485.100000143051,"responseStart":3485.100000143051,"secureConnectionStart":1620.2000000476837},{"duration":3135.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":1621.3000001907349,"connectEnd":1621.3000001907349,"connectStart":1621.3000001907349,"domainLookupEnd":1621.3000001907349,"domainLookupStart":1621.3000001907349,"fetchStart":1621.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1621.3000001907349,"responseEnd":4757.100000143051,"responseStart":4757.100000143051,"secureConnectionStart":1621.3000001907349},{"duration":3325.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":1621.3000001907349,"connectEnd":1621.3000001907349,"connectStart":1621.3000001907349,"domainLookupEnd":1621.3000001907349,"domainLookupStart":1621.3000001907349,"fetchStart":1621.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1621.3000001907349,"responseEnd":4946.800000190735,"responseStart":4946.800000190735,"secureConnectionStart":1621.3000001907349},{"duration":1195.0999999046326,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":3573.4000000953674,"connectEnd":3573.4000000953674,"connectStart":3573.4000000953674,"domainLookupEnd":3573.4000000953674,"domainLookupStart":3573.4000000953674,"fetchStart":3573.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":3573.4000000953674,"responseEnd":4768.5,"responseStart":4768.5,"secureConnectionStart":3573.4000000953674},{"duration":1070.2000000476837,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":3881.600000143051,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":3881.600000143051,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":4951.800000190735,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":1444,"responseStart":1613,"responseEnd":1614,"domLoading":1616,"domInteractive":4979,"domContentLoadedEventStart":4979,"domContentLoadedEventEnd":5026,"domComplete":7026,"loadEventStart":7026,"loadEventEnd":7028,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":4952.600000143051},{"name":"bigPipe.sidebar-id.end","time":4953.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":4953.600000143051},{"name":"bigPipe.activity-panel-pipe-id.end","time":4955.800000190735},{"name":"activityTabFullyLoaded","time":5034}],"measures":[],"correlationId":"51e431b13e12da","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":102,"dbReadsTimeInMs":16,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}