Type:
Bug
Priority:
Trivial
Resolution:
Fixed
Affects Version/s:
5.3.9
Component/s:
None
Initially reported in the KB as http://kb.askmonty.org/en/test-table-elimination-fails .
If sql-bench/test-table-elimination is started with --lock-tables (or --fast), it attempts to execute the following command:
LOCK TABLES elim_facts, elim_attr1, elim_attr2 WRITE
and reasonably fails with a syntax error, as it is not a valid statement: each table should be followed by a lock type separately.
The following change fixes this particular problem
95c95
< do_query($dbh,"LOCK TABLES elim_facts, elim_attr1, elim_attr2 WRITE");
—
> do_query($dbh,"LOCK TABLES elim_facts WRITE, elim_attr1 WRITE, elim_attr2 WRITE");
207c207
< do_query($dbh,"LOCK TABLES elim_facts, elim_attr1, elim_attr2 WRITE");
—
> do_query($dbh,"LOCK TABLES elim_facts WRITE, elim_attr1 WRITE, elim_attr2 WRITE");
but then another one reveals:
testing full facts facts table
Error occured with execute(select * from elim_current_facts where id=30246.3207346651)
-> Table 'F' was not locked with LOCK TABLES
This happens because the view elim_current_facts addresses the table elim_facts through its alias F, which is not locked explicitly. So, I also added the view itself into the LOCK statement:
95c95
< do_query($dbh,"LOCK TABLES elim_facts, elim_attr1, elim_attr2 WRITE");
—
> do_query($dbh,"LOCK TABLES elim_current_facts WRITE, elim_facts WRITE, elim_attr1 WRITE, elim_attr2 WRITE");
207c207
< do_query($dbh,"LOCK TABLES elim_facts, elim_attr1, elim_attr2 WRITE");
—
> do_query($dbh,"LOCK TABLES elim_current_facts WRITE, elim_facts WRITE, elim_attr1 WRITE, elim_attr2 WRITE");
Now it passes.
bzr version-info
revision-id: <email address hidden>
date: 2012-04-06 13:31:33 +0500
build-date: 2012-04-22 04:12:58 +0400
revno: 3146
According to the script code, should also be reproducible on 5.2-5.5.
To reproduce,
start MariaDB server;
run perl test-table-elimination --socket=<path to socket> --lock-tables
{"report":{"fcp":1323.7999999970198,"ttfb":313.29999999701977,"pageVisibility":"visible","entityId":21278,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"a1945984-b628-4608-a83d-d69c7eb6d0f2","navigationType":0,"readyForUser":1400.699999988079,"redirectCount":0,"resourceLoadedEnd":1639.5,"resourceLoadedStart":322.09999999403954,"resourceTiming":[{"duration":326,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":322.09999999403954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":322.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":648.0999999940395,"responseStart":0,"secureConnectionStart":0},{"duration":326.40000000596046,"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":322.3999999910593,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":322.3999999910593,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":648.7999999970198,"responseStart":0,"secureConnectionStart":0},{"duration":385.30000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":322.69999998807907,"connectEnd":322.69999998807907,"connectStart":322.69999998807907,"domainLookupEnd":322.69999998807907,"domainLookupStart":322.69999998807907,"fetchStart":322.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":322.69999998807907,"responseEnd":708,"responseStart":707.8999999910593,"secureConnectionStart":322.69999998807907},{"duration":677.3999999910593,"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":323.29999999701977,"connectEnd":323.29999999701977,"connectStart":323.29999999701977,"domainLookupEnd":323.29999999701977,"domainLookupStart":323.29999999701977,"fetchStart":323.29999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":323.29999999701977,"responseEnd":1000.6999999880791,"responseStart":1000.6999999880791,"secureConnectionStart":323.29999999701977},{"duration":680.7999999970198,"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":323.5,"connectEnd":323.5,"connectStart":323.5,"domainLookupEnd":323.5,"domainLookupStart":323.5,"fetchStart":323.5,"redirectEnd":0,"redirectStart":0,"requestStart":323.5,"responseEnd":1004.2999999970198,"responseStart":1004.2999999970198,"secureConnectionStart":323.5},{"duration":681.3000000119209,"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":323.69999998807907,"connectEnd":323.69999998807907,"connectStart":323.69999998807907,"domainLookupEnd":323.69999998807907,"domainLookupStart":323.69999998807907,"fetchStart":323.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":323.69999998807907,"responseEnd":1005,"responseStart":1005,"secureConnectionStart":323.69999998807907},{"duration":681.5999999940395,"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":323.79999999701977,"connectEnd":323.79999999701977,"connectStart":323.79999999701977,"domainLookupEnd":323.79999999701977,"domainLookupStart":323.79999999701977,"fetchStart":323.79999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":323.79999999701977,"responseEnd":1005.3999999910593,"responseStart":1005.3999999910593,"secureConnectionStart":323.79999999701977},{"duration":682.0999999940395,"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":324.09999999403954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":324.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1006.1999999880791,"responseStart":0,"secureConnectionStart":0},{"duration":682,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":324.19999998807907,"connectEnd":324.19999998807907,"connectStart":324.19999998807907,"domainLookupEnd":324.19999998807907,"domainLookupStart":324.19999998807907,"fetchStart":324.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":324.19999998807907,"responseEnd":1006.1999999880791,"responseStart":1006.1999999880791,"secureConnectionStart":324.19999998807907},{"duration":682.8999999910593,"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":324.29999999701977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":324.29999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1007.1999999880791,"responseStart":0,"secureConnectionStart":0},{"duration":682.5999999940395,"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":324.59999999403954,"connectEnd":324.59999999403954,"connectStart":324.59999999403954,"domainLookupEnd":324.59999999403954,"domainLookupStart":324.59999999403954,"fetchStart":324.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":324.59999999403954,"responseEnd":1007.1999999880791,"responseStart":1007.1999999880791,"secureConnectionStart":324.59999999403954},{"duration":977.2999999970198,"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":329.5,"connectEnd":329.5,"connectStart":329.5,"domainLookupEnd":329.5,"domainLookupStart":329.5,"fetchStart":329.5,"redirectEnd":0,"redirectStart":0,"requestStart":329.5,"responseEnd":1306.7999999970198,"responseStart":1306.7999999970198,"secureConnectionStart":329.5},{"duration":1303.4000000059605,"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":332.59999999403954,"connectEnd":332.59999999403954,"connectStart":332.59999999403954,"domainLookupEnd":332.59999999403954,"domainLookupStart":332.59999999403954,"fetchStart":332.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":332.59999999403954,"responseEnd":1636,"responseStart":1636,"secureConnectionStart":332.59999999403954},{"duration":390.8999999910593,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":856.5,"connectEnd":856.5,"connectStart":856.5,"domainLookupEnd":856.5,"domainLookupStart":856.5,"fetchStart":856.5,"redirectEnd":0,"redirectStart":0,"requestStart":856.5,"responseEnd":1247.3999999910593,"responseStart":1247.3999999910593,"secureConnectionStart":856.5},{"duration":361.5,"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":1275,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1275,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1636.5,"responseStart":0,"secureConnectionStart":0},{"duration":361.3999999910593,"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":1276,"connectEnd":1276,"connectStart":1276,"domainLookupEnd":1276,"domainLookupStart":1276,"fetchStart":1276,"redirectEnd":0,"redirectStart":0,"requestStart":1276,"responseEnd":1637.3999999910593,"responseStart":1637.3999999910593,"secureConnectionStart":1276},{"duration":363.1000000089407,"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":1276.3999999910593,"connectEnd":1276.3999999910593,"connectStart":1276.3999999910593,"domainLookupEnd":1276.3999999910593,"domainLookupStart":1276.3999999910593,"fetchStart":1276.3999999910593,"redirectEnd":0,"redirectStart":0,"requestStart":1276.3999999910593,"responseEnd":1639.5,"responseStart":1639.5,"secureConnectionStart":1276.3999999910593},{"duration":326.3999999910593,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1316.2999999970198,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1316.2999999970198,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1642.699999988079,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":140,"responseStart":313,"responseEnd":332,"domLoading":317,"domInteractive":1665,"domContentLoadedEventStart":1665,"domContentLoadedEventEnd":1705,"domComplete":2058,"loadEventStart":2058,"loadEventEnd":2059,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1643.7999999970198},{"name":"bigPipe.sidebar-id.end","time":1644.699999988079},{"name":"bigPipe.activity-panel-pipe-id.start","time":1644.8999999910593},{"name":"bigPipe.activity-panel-pipe-id.end","time":1645.8999999910593},{"name":"activityTabFullyLoaded","time":1761.0999999940395}],"measures":[],"correlationId":"f8c7dae0e88289","effectiveType":"4g","downlink":9,"rtt":0,"serverDuration":111,"dbReadsTimeInMs":15,"dbConnsTimeInMs":25,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Launchpad bug id: 986731