With MDEV-15132 in MariaDB 10.3.5, InnoDB no longer writes the transaction identifier to the TRX_SYS page. The information is only written to undo log headers. Because the setting innodb_force_recovery=5 will skip reading any undo logs, the maximum transaction identifier cannot be determined.
Because of this, the following kind of warning messages are bogus and should be suppressed when running with innodb_force_recovery set to 5 or 6:
CURRENT_TEST: innodb.innodb_force_recovery
|
--- /usr/share/mysql-test/suite/innodb/r/innodb_force_recovery.result 2018-02-24 20:33:04.000000000 +0000
|
+++ /dev/shm/var/1/log/innodb_force_recovery.reject 2018-02-25 00:10:34.038752342 +0000
|
@@ -34,7 +34,8 @@
|
# Restart the server with innodb_force_recovery as 5.
|
select * from t2;
|
f1 f2
|
-1 2
|
+Warnings:
|
+Warning 1642 InnoDB: Transaction id in a record of table `test`.`t2` is newer than system-wide maximum.
|
insert into t2 values(2, 3);
|
ERROR HY000: Running in read-only mode
|
alter table t2 add f3 int not null, algorithm=copy;
|
|
mysqltest: Result length mismatch
|
{"report":{"fcp":794.7999999523163,"ttfb":202.29999995231628,"pageVisibility":"visible","entityId":66047,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"3ae8213f-882f-4ec7-9c2b-5e445e5b354b","navigationType":0,"readyForUser":907.5,"redirectCount":0,"resourceLoadedEnd":537.5,"resourceLoadedStart":210.60000002384186,"resourceTiming":[{"duration":5.699999928474426,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":210.60000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":210.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":216.29999995231628,"responseStart":0,"secureConnectionStart":0},{"duration":5.399999976158142,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":210.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":210.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":216.29999995231628,"responseStart":0,"secureConnectionStart":0},{"duration":185.60000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":211,"connectEnd":211,"connectStart":211,"domainLookupEnd":211,"domainLookupStart":211,"fetchStart":211,"redirectEnd":0,"redirectStart":0,"requestStart":217.70000004768372,"responseEnd":396.60000002384186,"responseStart":241.10000002384186,"secureConnectionStart":211},{"duration":326,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":211.5,"connectEnd":211.5,"connectStart":211.5,"domainLookupEnd":211.5,"domainLookupStart":211.5,"fetchStart":211.5,"redirectEnd":0,"redirectStart":0,"requestStart":219,"responseEnd":537.5,"responseStart":254.29999995231628,"secureConnectionStart":211.5},{"duration":33.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":211.60000002384186,"connectEnd":211.60000002384186,"connectStart":211.60000002384186,"domainLookupEnd":211.60000002384186,"domainLookupStart":211.60000002384186,"fetchStart":211.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":221.39999997615814,"responseEnd":245,"responseStart":243,"secureConnectionStart":211.60000002384186},{"duration":33.699999928474426,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":211.70000004768372,"connectEnd":211.70000004768372,"connectStart":211.70000004768372,"domainLookupEnd":211.70000004768372,"domainLookupStart":211.70000004768372,"fetchStart":211.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":223.29999995231628,"responseEnd":245.39999997615814,"responseStart":243.70000004768372,"secureConnectionStart":211.70000004768372},{"duration":44.199999928474426,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":211.70000004768372,"connectEnd":211.70000004768372,"connectStart":211.70000004768372,"domainLookupEnd":211.70000004768372,"domainLookupStart":211.70000004768372,"fetchStart":211.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":232.60000002384186,"responseEnd":255.89999997615814,"responseStart":253.89999997615814,"secureConnectionStart":211.70000004768372},{"duration":10.200000047683716,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":211.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":211.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":222.10000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":52.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":212,"connectEnd":212,"connectStart":212,"domainLookupEnd":212,"domainLookupStart":212,"fetchStart":212,"redirectEnd":0,"redirectStart":0,"requestStart":232.70000004768372,"responseEnd":264.39999997615814,"responseStart":262.60000002384186,"secureConnectionStart":212},{"duration":14.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":212.10000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":212.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":226.60000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":49.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":212.20000004768372,"connectEnd":212.20000004768372,"connectStart":212.20000004768372,"domainLookupEnd":212.20000004768372,"domainLookupStart":212.20000004768372,"fetchStart":212.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":232.79999995231628,"responseEnd":261.2999999523163,"responseStart":256.7999999523163,"secureConnectionStart":212.20000004768372},{"duration":304.6999999284744,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":214.20000004768372,"connectEnd":214.20000004768372,"connectStart":214.20000004768372,"domainLookupEnd":214.20000004768372,"domainLookupStart":214.20000004768372,"fetchStart":214.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":253.39999997615814,"responseEnd":518.8999999761581,"responseStart":514.3999999761581,"secureConnectionStart":214.20000004768372},{"duration":305.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":214.20000004768372,"connectEnd":214.20000004768372,"connectStart":214.20000004768372,"domainLookupEnd":214.20000004768372,"domainLookupStart":214.20000004768372,"fetchStart":214.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":259.89999997615814,"responseEnd":519.2999999523163,"responseStart":515.5,"secureConnectionStart":214.20000004768372},{"duration":130.29999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":538.2000000476837,"connectEnd":538.2000000476837,"connectStart":538.2000000476837,"domainLookupEnd":538.2000000476837,"domainLookupStart":538.2000000476837,"fetchStart":538.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":633.7999999523163,"responseEnd":668.5,"responseStart":666.6000000238419,"secureConnectionStart":538.2000000476837},{"duration":148.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":751.5,"connectEnd":751.5,"connectStart":751.5,"domainLookupEnd":751.5,"domainLookupStart":751.5,"fetchStart":751.5,"redirectEnd":0,"redirectStart":0,"requestStart":867.2999999523163,"responseEnd":900,"responseStart":898.3999999761581,"secureConnectionStart":751.5},{"duration":216.10000002384186,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":788.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":788.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1004.3999999761581,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":30,"responseStart":203,"responseEnd":214,"domLoading":206,"domInteractive":963,"domContentLoadedEventStart":963,"domContentLoadedEventEnd":1008,"domComplete":1174,"loadEventStart":1174,"loadEventEnd":1174,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":944.7999999523163},{"name":"bigPipe.sidebar-id.end","time":945.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":945.6000000238419},{"name":"bigPipe.activity-panel-pipe-id.end","time":946.5},{"name":"activityTabFullyLoaded","time":1025}],"measures":[],"correlationId":"54a6668be74b80","effectiveType":"4g","downlink":9.1,"rtt":0,"serverDuration":95,"dbReadsTimeInMs":15,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
An appropriate fix would seem to be to use the READ UNCOMMITTED isolation level when innodb_force_recovery is set to 5 or more, regardless of the user-specified transaction isolation level. Since MariaDB 10.2 (along with upstream MySQL 5.7), InnoDB already does this for innodb_read_only=1.