Type:
Bug
Priority:
Critical
Resolution:
Fixed
Affects Version/s:
None
The following EXPLAIN EXTENDED statement produces different number of warning in case it is executed as a regular statement or as a prepared statement. In the later case one extra warning is generated.
CREATE TABLE t1 (c int);
CREATE TABLE t2 (d int);
EXPLAIN EXTENDED SELECT (SELECT 1 FROM t2 WHERE d = c) FROM t1;
id
select_type
table
type
possible_keys
key
key_len
ref
rows
filtered
Extra
1
PRIMARY
t1
ALL
NULL
NULL
NULL
NULL
1
100.00
2
DEPENDENT SUBQUERY
t2
ALL
NULL
NULL
NULL
NULL
1
100.00
Using where
2 rows in set, 2 warnings (0,020 sec)
^^^^^^^^ 2 Warnings produced
Level
Code
Message
Note
1276
Field or reference 'test.t1.c' of SELECT #2 was resolved in SELECT #1
Note
1003
select <expr_cache><`test`.`t1`.`c`>((select 1 from `test`.`t2` where `test`.`t2`.`d` = `test`.`t1`.`c`)) AS `(SELECT 1 FROM t2 WHERE d = c)` from `test`.`t1`
PREPARE stmt FROM "EXPLAIN EXTENDED SELECT (SELECT 1 FROM t2 WHERE d = c) FROM t1";
EXECUTE stmt;
id
select_type
table
type
possible_keys
key
key_len
ref
rows
filtered
Extra
1
PRIMARY
t1
ALL
NULL
NULL
NULL
NULL
1
100.00
2
DEPENDENT SUBQUERY
t2
ALL
NULL
NULL
NULL
NULL
1
100.00
Using where
2 rows in set, 3 warnings (0,001 sec)
^^^^^^^^ 3 Warnings produced (1 extra warning)
Level
Code
Message
Note
1276
Field or reference 'c' of SELECT #2 was resolved in SELECT #1
Note
1276
Field or reference 'test.t1.c' of SELECT #2 was resolved in SELECT #1
Note
1003
select <expr_cache><`test`.`t1`.`c`>((select 1 from `test`.`t2` where `test`.`t2`.`d` = `test`.`t1`.`c`)) AS `(SELECT 1 FROM t2 WHERE d = c)` from `test`.`t1`
The same behavior (one extra warning generated in case the statement executed in PS mode) can be observed if the following test case is run:
CREATE TABLE t1 (a INT, b INT);
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (SELECT a FROM t1 AS x1 WHERE (t1.b IS NULL));
PREPARE stmt FROM "EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (SELECT a FROM t1 AS x1 WHERE (t1.b IS NULL))";
EXECUTE stmt;
blocks
MDEV-16708
Unsupported commands for prepared statements
Closed
{"report":{"fcp":784.1999999880791,"ttfb":175.30000001192093,"pageVisibility":"visible","entityId":97787,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"8d7f9341-40e5-4e73-8e7c-53787ef627fa","navigationType":0,"readyForUser":862.4000000357628,"redirectCount":0,"resourceLoadedEnd":897.6999999880791,"resourceLoadedStart":180.60000002384186,"resourceTiming":[{"duration":145.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":180.60000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":180.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":326.10000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":145.5,"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":180.9000000357628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":180.9000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":326.4000000357628,"responseStart":0,"secureConnectionStart":0},{"duration":154.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":181,"connectEnd":181,"connectStart":181,"domainLookupEnd":181,"domainLookupStart":181,"fetchStart":181,"redirectEnd":0,"redirectStart":0,"requestStart":181,"responseEnd":335.10000002384186,"responseStart":335.10000002384186,"secureConnectionStart":181},{"duration":196.60000002384186,"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":181.19999998807907,"connectEnd":181.19999998807907,"connectStart":181.19999998807907,"domainLookupEnd":181.19999998807907,"domainLookupStart":181.19999998807907,"fetchStart":181.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":181.19999998807907,"responseEnd":377.80000001192093,"responseStart":377.80000001192093,"secureConnectionStart":181.19999998807907},{"duration":200.0999999642372,"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":181.4000000357628,"connectEnd":181.4000000357628,"connectStart":181.4000000357628,"domainLookupEnd":181.4000000357628,"domainLookupStart":181.4000000357628,"fetchStart":181.4000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":181.4000000357628,"responseEnd":381.5,"responseStart":381.5,"secureConnectionStart":181.4000000357628},{"duration":200.39999997615814,"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":181.60000002384186,"connectEnd":181.60000002384186,"connectStart":181.60000002384186,"domainLookupEnd":181.60000002384186,"domainLookupStart":181.60000002384186,"fetchStart":181.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":181.60000002384186,"responseEnd":382,"responseStart":382,"secureConnectionStart":181.60000002384186},{"duration":200.60000002384186,"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":181.69999998807907,"connectEnd":181.69999998807907,"connectStart":181.69999998807907,"domainLookupEnd":181.69999998807907,"domainLookupStart":181.69999998807907,"fetchStart":181.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":181.69999998807907,"responseEnd":382.30000001192093,"responseStart":382.30000001192093,"secureConnectionStart":181.69999998807907},{"duration":292.5,"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":182,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":182,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":474.5,"responseStart":0,"secureConnectionStart":0},{"duration":200.5999999642372,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":182.10000002384186,"connectEnd":182.10000002384186,"connectStart":182.10000002384186,"domainLookupEnd":182.10000002384186,"domainLookupStart":182.10000002384186,"fetchStart":182.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":182.10000002384186,"responseEnd":382.69999998807907,"responseStart":382.69999998807907,"secureConnectionStart":182.10000002384186},{"duration":292.30000001192093,"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":182.30000001192093,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":182.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":474.60000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":200.80000001192093,"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":182.5,"connectEnd":182.5,"connectStart":182.5,"domainLookupEnd":182.5,"domainLookupStart":182.5,"fetchStart":182.5,"redirectEnd":0,"redirectStart":0,"requestStart":182.5,"responseEnd":383.30000001192093,"responseStart":383.30000001192093,"secureConnectionStart":182.5},{"duration":381.89999997615814,"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":183.30000001192093,"connectEnd":183.30000001192093,"connectStart":183.30000001192093,"domainLookupEnd":183.30000001192093,"domainLookupStart":183.30000001192093,"fetchStart":183.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":183.30000001192093,"responseEnd":565.1999999880791,"responseStart":565.1999999880791,"secureConnectionStart":183.30000001192093},{"duration":656.0999999642372,"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":183.4000000357628,"connectEnd":183.4000000357628,"connectStart":183.4000000357628,"domainLookupEnd":183.4000000357628,"domainLookupStart":183.4000000357628,"fetchStart":183.4000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":183.4000000357628,"responseEnd":839.5,"responseStart":839.5,"secureConnectionStart":183.4000000357628},{"duration":79.80000001192093,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":485.69999998807907,"connectEnd":485.69999998807907,"connectStart":485.69999998807907,"domainLookupEnd":485.69999998807907,"domainLookupStart":485.69999998807907,"fetchStart":485.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":485.69999998807907,"responseEnd":565.5,"responseStart":565.5,"secureConnectionStart":485.69999998807907},{"duration":153,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/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":739.6000000238419,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":739.6000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":892.6000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":152.69999998807907,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2bu7/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","startTime":740.1000000238419,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":740.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":892.8000000119209,"responseStart":0,"secureConnectionStart":0},{"duration":129.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/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":740.9000000357628,"connectEnd":740.9000000357628,"connectStart":740.9000000357628,"domainLookupEnd":740.9000000357628,"domainLookupStart":740.9000000357628,"fetchStart":740.9000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":740.9000000357628,"responseEnd":870.8000000119209,"responseStart":870.8000000119209,"secureConnectionStart":740.9000000357628},{"duration":155.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/f51ef5507eea4c158f257c66c93b2a3f-CDN/lu2bu7/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":741.3000000119209,"connectEnd":741.3000000119209,"connectStart":741.3000000119209,"domainLookupEnd":741.3000000119209,"domainLookupStart":741.3000000119209,"fetchStart":741.3000000119209,"redirectEnd":0,"redirectStart":0,"requestStart":741.3000000119209,"responseEnd":896.4000000357628,"responseStart":896.4000000357628,"secureConnectionStart":741.3000000119209},{"duration":156.0999999642372,"initiatorType":"script","name":"https://jira.mariadb.org/s/86ee9bbc76cd1bcd8556fcdcf46241c9-CDN/lu2bu7/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","startTime":741.6000000238419,"connectEnd":741.6000000238419,"connectStart":741.6000000238419,"domainLookupEnd":741.6000000238419,"domainLookupStart":741.6000000238419,"fetchStart":741.6000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":741.6000000238419,"responseEnd":897.6999999880791,"responseStart":897.6999999880791,"secureConnectionStart":741.6000000238419},{"duration":166.39999997615814,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":777.1000000238419,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":777.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":943.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":3,"responseStart":176,"responseEnd":178,"domLoading":178,"domInteractive":961,"domContentLoadedEventStart":961,"domContentLoadedEventEnd":1005,"domComplete":1169,"loadEventStart":1169,"loadEventEnd":1169,"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.6000000238419},{"name":"bigPipe.sidebar-id.end","time":946},{"name":"bigPipe.activity-panel-pipe-id.start","time":946.1000000238419},{"name":"bigPipe.activity-panel-pipe-id.end","time":947},{"name":"activityTabFullyLoaded","time":1022}],"measures":[],"correlationId":"116572dd936723","effectiveType":"4g","downlink":9,"rtt":0,"serverDuration":107,"dbReadsTimeInMs":11,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
OK to push