mysqldump ignores some internal tables by default, such as:
- mysql.apply_status
- mysql.schema
- mysql.general_log
- mysql.slow_log
- mysql.transaction_registry
See here:
https://github.com/MariaDB/server/blob/mariadb-10.4.8/client/mysqldump.c#L1001
I think the following tables should also be ignored by default:
- mysql.innodb_index_stats
- mysql.innodb_table_stats
The reason is that if someone tries to import a dump created by mysqldump, then a race condition between the import and the InnoDB persistent statistics calculation exists, and the user can see errors like this:
Duplicate 'PRIMARY-n_diff_pfx01' for key 'primary' for database 'xxxx98'.
|
This was reported long ago in the following upstream bug report:
https://bugs.mysql.com/bug.php?id=71814
The workaround mentioned in that bug report is to disable InnoDB persistent statistics prior to the import:
SET GLOBAL innodb_stats_auto_recalc=0;
|
SET GLOBAL innodb_stats_persistent=0;
|
However, it would be more ideal to make this workaround unnecessary by fixing the problem.
- relates to
-
MDEV-22037
Add ability to skip content of some tables (work around for MDEV-20939)
-
-
Closed
- links to
-
{"report":{"fcp":905.6000000014901,"ttfb":167.30000000447035,"pageVisibility":"visible","entityId":80039,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"7729e232-6544-42ba-a7af-bf42246b6d40","navigationType":0,"readyForUser":980.8000000044703,"redirectCount":0,"resourceLoadedEnd":997.3999999985099,"resourceLoadedStart":172.70000000298023,"resourceTiming":[{"duration":20.799999997019768,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":172.70000000298023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":172.70000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":193.5,"responseStart":0,"secureConnectionStart":0},{"duration":20.900000005960464,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":172.89999999850988,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":172.89999999850988,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":193.80000000447035,"responseStart":0,"secureConnectionStart":0},{"duration":72.70000000298023,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":173.10000000149012,"connectEnd":173.10000000149012,"connectStart":173.10000000149012,"domainLookupEnd":173.10000000149012,"domainLookupStart":173.10000000149012,"fetchStart":173.10000000149012,"redirectEnd":0,"redirectStart":0,"requestStart":173.10000000149012,"responseEnd":245.80000000447035,"responseStart":245.80000000447035,"secureConnectionStart":173.10000000149012},{"duration":369.79999999701977,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":173.20000000298023,"connectEnd":173.20000000298023,"connectStart":173.20000000298023,"domainLookupEnd":173.20000000298023,"domainLookupStart":173.20000000298023,"fetchStart":173.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":173.20000000298023,"responseEnd":543,"responseStart":543,"secureConnectionStart":173.20000000298023},{"duration":373.20000000298023,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":173.5,"connectEnd":173.5,"connectStart":173.5,"domainLookupEnd":173.5,"domainLookupStart":173.5,"fetchStart":173.5,"redirectEnd":0,"redirectStart":0,"requestStart":173.5,"responseEnd":546.7000000029802,"responseStart":546.7000000029802,"secureConnectionStart":173.5},{"duration":373.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":173.60000000149012,"connectEnd":173.60000000149012,"connectStart":173.60000000149012,"domainLookupEnd":173.60000000149012,"domainLookupStart":173.60000000149012,"fetchStart":173.60000000149012,"redirectEnd":0,"redirectStart":0,"requestStart":173.60000000149012,"responseEnd":547.1000000014901,"responseStart":547.1000000014901,"secureConnectionStart":173.60000000149012},{"duration":373.69999999552965,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":173.80000000447035,"connectEnd":173.80000000447035,"connectStart":173.80000000447035,"domainLookupEnd":173.80000000447035,"domainLookupStart":173.80000000447035,"fetchStart":173.80000000447035,"redirectEnd":0,"redirectStart":0,"requestStart":173.80000000447035,"responseEnd":547.5,"responseStart":547.5,"secureConnectionStart":173.80000000447035},{"duration":374.70000000298023,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":173.89999999850988,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":173.89999999850988,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":548.6000000014901,"responseStart":0,"secureConnectionStart":0},{"duration":373.79999999701977,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":174.10000000149012,"connectEnd":174.10000000149012,"connectStart":174.10000000149012,"domainLookupEnd":174.10000000149012,"domainLookupStart":174.10000000149012,"fetchStart":174.10000000149012,"redirectEnd":0,"redirectStart":0,"requestStart":174.10000000149012,"responseEnd":547.8999999985099,"responseStart":547.8999999985099,"secureConnectionStart":174.10000000149012},{"duration":374.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":174.30000000447035,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":174.30000000447035,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":548.8000000044703,"responseStart":0,"secureConnectionStart":0},{"duration":374,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":174.5,"connectEnd":174.5,"connectStart":174.5,"domainLookupEnd":174.5,"domainLookupStart":174.5,"fetchStart":174.5,"redirectEnd":0,"redirectStart":0,"requestStart":174.5,"responseEnd":548.5,"responseStart":548.5,"secureConnectionStart":174.5},{"duration":440.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":175.5,"connectEnd":175.5,"connectStart":175.5,"domainLookupEnd":175.5,"domainLookupStart":175.5,"fetchStart":175.5,"redirectEnd":0,"redirectStart":0,"requestStart":175.5,"responseEnd":616,"responseStart":616,"secureConnectionStart":175.5},{"duration":717.6000000014901,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":175.5,"connectEnd":175.5,"connectStart":175.5,"domainLookupEnd":175.5,"domainLookupStart":175.5,"fetchStart":175.5,"redirectEnd":0,"redirectStart":0,"requestStart":175.5,"responseEnd":893.1000000014901,"responseStart":893.1000000014901,"secureConnectionStart":175.5},{"duration":224.60000000149012,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":391,"connectEnd":391,"connectStart":391,"domainLookupEnd":391,"domainLookupStart":391,"fetchStart":391,"redirectEnd":0,"redirectStart":0,"requestStart":391,"responseEnd":615.6000000014901,"responseStart":615.6000000014901,"secureConnectionStart":391},{"duration":186.39999999850988,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&slack-enabled=true","startTime":811,"connectEnd":811,"connectStart":811,"domainLookupEnd":811,"domainLookupStart":811,"fetchStart":811,"redirectEnd":0,"redirectStart":0,"requestStart":811,"responseEnd":997.3999999985099,"responseStart":997.3999999985099,"secureConnectionStart":811},{"duration":183.70000000298023,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":899.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":899.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1083.2000000029802,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":8,"responseStart":167,"responseEnd":168,"domLoading":171,"domInteractive":1037,"domContentLoadedEventStart":1037,"domContentLoadedEventEnd":1080,"domComplete":1546,"loadEventStart":1546,"loadEventEnd":1546,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1013.3999999985099},{"name":"bigPipe.sidebar-id.end","time":1014.3000000044703},{"name":"bigPipe.activity-panel-pipe-id.start","time":1014.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1016.8000000044703},{"name":"activityTabFullyLoaded","time":1087.7000000029802}],"measures":[],"correlationId":"f4c8a1a4fe2261","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":100,"dbReadsTimeInMs":12,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}