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":1248.7000000476837,"ttfb":340.2999999523163,"pageVisibility":"visible","entityId":71182,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"b9385adb-9fa8-457d-9bdd-2ade560025cd","navigationType":0,"readyForUser":1324.7000000476837,"redirectCount":0,"resourceLoadedEnd":1601,"resourceLoadedStart":363.2000000476837,"resourceTiming":[{"duration":289.89999997615814,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":363.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":363.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":653.1000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":290,"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":363.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":363.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":653.5,"responseStart":0,"secureConnectionStart":0},{"duration":325.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":363.60000002384186,"connectEnd":363.60000002384186,"connectStart":363.60000002384186,"domainLookupEnd":363.60000002384186,"domainLookupStart":363.60000002384186,"fetchStart":363.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":363.60000002384186,"responseEnd":689.1000000238419,"responseStart":689.1000000238419,"secureConnectionStart":363.60000002384186},{"duration":441.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":363.7999999523163,"connectEnd":363.7999999523163,"connectStart":363.7999999523163,"domainLookupEnd":363.7999999523163,"domainLookupStart":363.7999999523163,"fetchStart":363.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":363.7999999523163,"responseEnd":805.5,"responseStart":805.5,"secureConnectionStart":363.7999999523163},{"duration":445.89999997615814,"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":364,"connectEnd":364,"connectStart":364,"domainLookupEnd":364,"domainLookupStart":364,"fetchStart":364,"redirectEnd":0,"redirectStart":0,"requestStart":364,"responseEnd":809.8999999761581,"responseStart":809.8999999761581,"secureConnectionStart":364},{"duration":446.09999990463257,"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":364.2000000476837,"connectEnd":364.2000000476837,"connectStart":364.2000000476837,"domainLookupEnd":364.2000000476837,"domainLookupStart":364.2000000476837,"fetchStart":364.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":364.2000000476837,"responseEnd":810.2999999523163,"responseStart":810.2999999523163,"secureConnectionStart":364.2000000476837},{"duration":446.60000002384186,"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":364.2999999523163,"connectEnd":364.2999999523163,"connectStart":364.2999999523163,"domainLookupEnd":364.2999999523163,"domainLookupStart":364.2999999523163,"fetchStart":364.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":364.2999999523163,"responseEnd":810.8999999761581,"responseStart":810.8999999761581,"secureConnectionStart":364.2999999523163},{"duration":487.2000000476837,"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":364.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":364.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":851.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":446.6999999284744,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":364.60000002384186,"connectEnd":364.60000002384186,"connectStart":364.60000002384186,"domainLookupEnd":364.60000002384186,"domainLookupStart":364.60000002384186,"fetchStart":364.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":364.60000002384186,"responseEnd":811.2999999523163,"responseStart":811.2999999523163,"secureConnectionStart":364.60000002384186},{"duration":487.10000002384186,"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":364.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":364.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":851.8999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":446.89999997615814,"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":365,"connectEnd":365,"connectStart":365,"domainLookupEnd":365,"domainLookupStart":365,"fetchStart":365,"redirectEnd":0,"redirectStart":0,"requestStart":365,"responseEnd":811.8999999761581,"responseStart":811.8999999761581,"secureConnectionStart":365},{"duration":898.5,"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":365.7000000476837,"connectEnd":365.7000000476837,"connectStart":365.7000000476837,"domainLookupEnd":365.7000000476837,"domainLookupStart":365.7000000476837,"fetchStart":365.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":365.7000000476837,"responseEnd":1264.2000000476837,"responseStart":1264.2000000476837,"secureConnectionStart":365.7000000476837},{"duration":1169.6000000238419,"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":365.7999999523163,"connectEnd":365.7999999523163,"connectStart":365.7999999523163,"domainLookupEnd":365.7999999523163,"domainLookupStart":365.7999999523163,"fetchStart":365.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":365.7999999523163,"responseEnd":1535.3999999761581,"responseStart":1535.3999999761581,"secureConnectionStart":365.7999999523163},{"duration":373.2000000476837,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":891.8999999761581,"connectEnd":891.8999999761581,"connectStart":891.8999999761581,"domainLookupEnd":891.8999999761581,"domainLookupStart":891.8999999761581,"fetchStart":891.8999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":891.8999999761581,"responseEnd":1265.1000000238419,"responseStart":1265.1000000238419,"secureConnectionStart":891.8999999761581},{"duration":314,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1240,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1240,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1554,"responseStart":0,"secureConnectionStart":0},{"duration":204.10000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/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&whisper-enabled=true","startTime":1387.6000000238419,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1387.6000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1591.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":205.10000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2cib/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/css/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1388.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1388.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1593.3999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":191.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/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&whisper-enabled=true","startTime":1389.2999999523163,"connectEnd":1389.2999999523163,"connectStart":1389.2999999523163,"domainLookupEnd":1389.2999999523163,"domainLookupStart":1389.2999999523163,"fetchStart":1389.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1389.2999999523163,"responseEnd":1581,"responseStart":1581,"secureConnectionStart":1389.2999999523163},{"duration":209.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/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&whisper-enabled=true","startTime":1390,"connectEnd":1390,"connectStart":1390,"domainLookupEnd":1390,"domainLookupStart":1390,"fetchStart":1390,"redirectEnd":0,"redirectStart":0,"requestStart":1390,"responseEnd":1599.3999999761581,"responseStart":1599.3999999761581,"secureConnectionStart":1390},{"duration":210.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/e0bf5781d46ea69fb123572974cf39de-CDN/lu2cib/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/js/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":1390.5,"connectEnd":1390.5,"connectStart":1390.5,"domainLookupEnd":1390.5,"domainLookupStart":1390.5,"fetchStart":1390.5,"redirectEnd":0,"redirectStart":0,"requestStart":1390.5,"responseEnd":1601,"responseStart":1601,"secureConnectionStart":1390.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":188,"responseStart":340,"responseEnd":341,"domLoading":361,"domInteractive":1616,"domContentLoadedEventStart":1616,"domContentLoadedEventEnd":1660,"domComplete":3214,"loadEventStart":3214,"loadEventEnd":3216,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1594.6000000238419},{"name":"bigPipe.sidebar-id.end","time":1595.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1595.6000000238419},{"name":"bigPipe.activity-panel-pipe-id.end","time":1598.2000000476837},{"name":"activityTabFullyLoaded","time":1668.6000000238419}],"measures":[],"correlationId":"80c0804e6621e9","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":92,"dbReadsTimeInMs":11,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}