I have a workload that does partitioning manually (largely because at the end of each day I want to 'optimize table' for the previous day's partition to address fragmentation). As a result there's a stored procedure, that prepares a statement of the form "create table if not exists table_20181130 like table_template" and runs it. This procedure is called rather a lot and >99% of the time the table already exists so this doesn't do anything. This has been working great up-to and including MariaDB 10.3.9.
Upon upgrading to 10.3.10 (or 11) I find that performance of my system is abysmal. And this seems to be down to this procedure - the create table if not exists doesn't return immediately like it used to if the table exists and any other query has the table open. I can work around this by looking in information_schema.TABLES and avoiding the 'create table if not exists' if the table already exists - however this feels like a regression to me rather than an intentional change, especially as I don't see anything obviously related in the 10.3.10 ChangeLog.
To recreate; in one terminal execute:
create table if not exists test1 (a int);
|
select sum(a), sleep(60) from test1;
|
... and in another:
create table if not exists test1 (a int);
|
In anything before 10.3.10 the second terminal will complete immediately, but in 10.3.10 (or 11) the second terminal will only complete once the select in the first terminal has done so.
{"report":{"fcp":838.6000000014901,"ttfb":247.29999999701977,"pageVisibility":"visible","entityId":71182,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"dd3c5e5e-458b-44b1-a035-9cdc59a0cbc6","navigationType":0,"readyForUser":914.6000000014901,"redirectCount":0,"resourceLoadedEnd":939.5,"resourceLoadedStart":253.60000000149012,"resourceTiming":[{"duration":26.600000001490116,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":253.60000000149012,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":253.60000000149012,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":280.20000000298023,"responseStart":0,"secureConnectionStart":0},{"duration":27.200000002980232,"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":253.79999999701977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":253.79999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":281,"responseStart":0,"secureConnectionStart":0},{"duration":84.79999999701977,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":254,"connectEnd":254,"connectStart":254,"domainLookupEnd":254,"domainLookupStart":254,"fetchStart":254,"redirectEnd":0,"redirectStart":0,"requestStart":254,"responseEnd":338.79999999701977,"responseStart":338.79999999701977,"secureConnectionStart":254},{"duration":172.39999999850988,"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":254.20000000298023,"connectEnd":254.20000000298023,"connectStart":254.20000000298023,"domainLookupEnd":254.20000000298023,"domainLookupStart":254.20000000298023,"fetchStart":254.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":254.20000000298023,"responseEnd":426.6000000014901,"responseStart":426.6000000014901,"secureConnectionStart":254.20000000298023},{"duration":175.5,"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":254.39999999850988,"connectEnd":254.39999999850988,"connectStart":254.39999999850988,"domainLookupEnd":254.39999999850988,"domainLookupStart":254.39999999850988,"fetchStart":254.39999999850988,"redirectEnd":0,"redirectStart":0,"requestStart":254.39999999850988,"responseEnd":429.8999999985099,"responseStart":429.8999999985099,"secureConnectionStart":254.39999999850988},{"duration":175.79999999701977,"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":254.60000000149012,"connectEnd":254.60000000149012,"connectStart":254.60000000149012,"domainLookupEnd":254.60000000149012,"domainLookupStart":254.60000000149012,"fetchStart":254.60000000149012,"redirectEnd":0,"redirectStart":0,"requestStart":254.60000000149012,"responseEnd":430.3999999985099,"responseStart":430.3999999985099,"secureConnectionStart":254.60000000149012},{"duration":176.79999999701977,"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":254.70000000298023,"connectEnd":254.70000000298023,"connectStart":254.70000000298023,"domainLookupEnd":254.70000000298023,"domainLookupStart":254.70000000298023,"fetchStart":254.70000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":254.70000000298023,"responseEnd":431.5,"responseStart":431.5,"secureConnectionStart":254.70000000298023},{"duration":227.10000000149012,"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":254.89999999850988,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":254.89999999850988,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":482,"responseStart":0,"secureConnectionStart":0},{"duration":177,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":255.10000000149012,"connectEnd":255.10000000149012,"connectStart":255.10000000149012,"domainLookupEnd":255.10000000149012,"domainLookupStart":255.10000000149012,"fetchStart":255.10000000149012,"redirectEnd":0,"redirectStart":0,"requestStart":255.10000000149012,"responseEnd":432.1000000014901,"responseStart":432.1000000014901,"secureConnectionStart":255.10000000149012},{"duration":226.89999999850988,"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":255.20000000298023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":255.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":482.1000000014901,"responseStart":0,"secureConnectionStart":0},{"duration":177.5,"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":255.39999999850988,"connectEnd":255.39999999850988,"connectStart":255.39999999850988,"domainLookupEnd":255.39999999850988,"domainLookupStart":255.39999999850988,"fetchStart":255.39999999850988,"redirectEnd":0,"redirectStart":0,"requestStart":255.39999999850988,"responseEnd":432.8999999985099,"responseStart":432.8999999985099,"secureConnectionStart":255.39999999850988},{"duration":388,"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":256.20000000298023,"connectEnd":256.20000000298023,"connectStart":256.20000000298023,"domainLookupEnd":256.20000000298023,"domainLookupStart":256.20000000298023,"fetchStart":256.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":256.20000000298023,"responseEnd":644.2000000029802,"responseStart":644.2000000029802,"secureConnectionStart":256.20000000298023},{"duration":622.3000000044703,"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":256.29999999701977,"connectEnd":256.29999999701977,"connectStart":256.29999999701977,"domainLookupEnd":256.29999999701977,"domainLookupStart":256.29999999701977,"fetchStart":256.29999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":256.29999999701977,"responseEnd":878.6000000014901,"responseStart":878.6000000014901,"secureConnectionStart":256.29999999701977},{"duration":137.60000000149012,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":507.3999999985099,"connectEnd":507.3999999985099,"connectStart":507.3999999985099,"domainLookupEnd":507.3999999985099,"domainLookupStart":507.3999999985099,"fetchStart":507.3999999985099,"redirectEnd":0,"redirectStart":0,"requestStart":507.3999999985099,"responseEnd":645,"responseStart":645,"secureConnectionStart":507.3999999985099},{"duration":187.60000000149012,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":751.8999999985099,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":751.8999999985099,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":939.5,"responseStart":0,"secureConnectionStart":0},{"duration":155.80000000447035,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":752.8999999985099,"connectEnd":752.8999999985099,"connectStart":752.8999999985099,"domainLookupEnd":752.8999999985099,"domainLookupStart":752.8999999985099,"fetchStart":752.8999999985099,"redirectEnd":0,"redirectStart":0,"requestStart":752.8999999985099,"responseEnd":908.7000000029802,"responseStart":908.7000000029802,"secureConnectionStart":752.8999999985099},{"duration":159.70000000298023,"initiatorType":"script","name":"https://jira.mariadb.org/s/53a43b6764f587426c7bb9a150184c00-CDN/lu2bv2/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":753.2999999970198,"connectEnd":753.2999999970198,"connectStart":753.2999999970198,"domainLookupEnd":753.2999999970198,"domainLookupStart":753.2999999970198,"fetchStart":753.2999999970198,"redirectEnd":0,"redirectStart":0,"requestStart":753.2999999970198,"responseEnd":913,"responseStart":913,"secureConnectionStart":753.2999999970198},{"duration":116,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":830.7000000029802,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":830.7000000029802,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":946.7000000029802,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":70,"responseStart":248,"responseEnd":251,"domLoading":251,"domInteractive":968,"domContentLoadedEventStart":968,"domContentLoadedEventEnd":1006,"domComplete":1346,"loadEventStart":1346,"loadEventEnd":1348,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":955.3999999985099},{"name":"bigPipe.sidebar-id.end","time":956.2999999970198},{"name":"bigPipe.activity-panel-pipe-id.start","time":956.3999999985099},{"name":"bigPipe.activity-panel-pipe-id.end","time":958.8999999985099},{"name":"activityTabFullyLoaded","time":1019.2999999970198}],"measures":[],"correlationId":"3408e8ebf70644","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":109,"dbReadsTimeInMs":9,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}