-
Bug
-
-
Critical
-
Resolution:
Fixed
-
N/A
-
-
-
I could only reproduce it on bb-11.0 so far.
--source include/have_sequence.inc
|
|
CREATE TABLE t (a INT PRIMARY KEY);
|
INSERT INTO t SELECT seq FROM seq_1_to_30;
|
|
ANALYZE TABLE t PERSISTENT FOR ALL;
|
|
SET IN_PREDICATE_CONVERSION_THRESHOLD=4;
|
SELECT a FROM t WHERE a IN ( 1, 1, 2, 194 );
|
SET IN_PREDICATE_CONVERSION_THRESHOLD=100;
|
SELECT a FROM t WHERE a IN ( 1, 1, 2, 194 );
|
|
drop table t;
|
bb-11.0
|
SET IN_PREDICATE_CONVERSION_THRESHOLD=4;
|
SELECT a FROM t WHERE a IN ( 1, 1, 2, 194 );
|
a
|
1
|
1
|
2
|
SET IN_PREDICATE_CONVERSION_THRESHOLD=100;
|
SELECT a FROM t WHERE a IN ( 1, 1, 2, 194 );
|
a
|
1
|
2
|
The second one is of course the correct result.
Plan with the wrong result:
explain extended SELECT a FROM t WHERE a IN ( 1, 1, 2, 194 );
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
1 PRIMARY <derived3> ALL NULL NULL NULL NULL 4 100.00
|
1 PRIMARY t eq_ref PRIMARY PRIMARY 4 tvc_0._col_1 1 100.00 Using index
|
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
Warnings:
|
Note 1003 /* select#1 */ select `test`.`t`.`a` AS `a` from (values (1),(1),(2),(194)) `tvc_0` join `test`.`t` where `test`.`t`.`a` = `tvc_0`.`_col_1`
|
Reproducible with MyISAM, InnoDB, Aria.
{"report":{"fcp":1091.5,"ttfb":296.90000009536743,"pageVisibility":"visible","entityId":118862,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"9d334e10-7cf7-41fc-a525-22053e04cfe2","navigationType":0,"readyForUser":1183.9000000953674,"redirectCount":0,"resourceLoadedEnd":1455.8000001907349,"resourceLoadedStart":302.80000019073486,"resourceTiming":[{"duration":272.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":302.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":302.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":575.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":272.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":303.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":303.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":575.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":301.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":303.30000019073486,"connectEnd":303.30000019073486,"connectStart":303.30000019073486,"domainLookupEnd":303.30000019073486,"domainLookupStart":303.30000019073486,"fetchStart":303.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":303.30000019073486,"responseEnd":605,"responseStart":604.9000000953674,"secureConnectionStart":303.30000019073486},{"duration":362.6000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":303.5,"connectEnd":303.5,"connectStart":303.5,"domainLookupEnd":303.5,"domainLookupStart":303.5,"fetchStart":303.5,"redirectEnd":0,"redirectStart":0,"requestStart":303.5,"responseEnd":666.1000003814697,"responseStart":666.1000003814697,"secureConnectionStart":303.5},{"duration":366.59999990463257,"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":303.7000002861023,"connectEnd":303.7000002861023,"connectStart":303.7000002861023,"domainLookupEnd":303.7000002861023,"domainLookupStart":303.7000002861023,"fetchStart":303.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":303.7000002861023,"responseEnd":670.3000001907349,"responseStart":670.3000001907349,"secureConnectionStart":303.7000002861023},{"duration":366.80000019073486,"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":303.90000009536743,"connectEnd":303.90000009536743,"connectStart":303.90000009536743,"domainLookupEnd":303.90000009536743,"domainLookupStart":303.90000009536743,"fetchStart":303.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":303.90000009536743,"responseEnd":670.7000002861023,"responseStart":670.7000002861023,"secureConnectionStart":303.90000009536743},{"duration":367,"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":304,"connectEnd":304,"connectStart":304,"domainLookupEnd":304,"domainLookupStart":304,"fetchStart":304,"redirectEnd":0,"redirectStart":0,"requestStart":304,"responseEnd":671,"responseStart":671,"secureConnectionStart":304},{"duration":457.2999997138977,"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":304.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":304.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":761.5,"responseStart":0,"secureConnectionStart":0},{"duration":367.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":304.30000019073486,"connectEnd":304.30000019073486,"connectStart":304.30000019073486,"domainLookupEnd":304.30000019073486,"domainLookupStart":304.30000019073486,"fetchStart":304.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":304.30000019073486,"responseEnd":671.6000003814697,"responseStart":671.6000003814697,"secureConnectionStart":304.30000019073486},{"duration":457.2000002861023,"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":304.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":304.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":761.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":368,"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":304.7000002861023,"connectEnd":304.7000002861023,"connectStart":304.7000002861023,"domainLookupEnd":304.7000002861023,"domainLookupStart":304.7000002861023,"fetchStart":304.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":304.7000002861023,"responseEnd":672.7000002861023,"responseStart":672.7000002861023,"secureConnectionStart":304.7000002861023},{"duration":531.1999998092651,"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":305.6000003814697,"connectEnd":305.6000003814697,"connectStart":305.6000003814697,"domainLookupEnd":305.6000003814697,"domainLookupStart":305.6000003814697,"fetchStart":305.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":305.6000003814697,"responseEnd":836.8000001907349,"responseStart":836.7000002861023,"secureConnectionStart":305.6000003814697},{"duration":1150.0999999046326,"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":305.7000002861023,"connectEnd":305.7000002861023,"connectStart":305.7000002861023,"domainLookupEnd":305.7000002861023,"domainLookupStart":305.7000002861023,"fetchStart":305.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":305.7000002861023,"responseEnd":1455.8000001907349,"responseStart":1455.8000001907349,"secureConnectionStart":305.7000002861023},{"duration":245.30000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":796.9000000953674,"connectEnd":796.9000000953674,"connectStart":796.9000000953674,"domainLookupEnd":796.9000000953674,"domainLookupStart":796.9000000953674,"fetchStart":796.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":796.9000000953674,"responseEnd":1042.2000002861023,"responseStart":1042.2000002861023,"secureConnectionStart":796.9000000953674}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":113,"responseStart":297,"responseEnd":300,"domLoading":300,"domInteractive":1479,"domContentLoadedEventStart":1479,"domContentLoadedEventEnd":1524,"domComplete":2371,"loadEventStart":2371,"loadEventEnd":2373,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1460.6000003814697},{"name":"bigPipe.sidebar-id.end","time":1461.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":1461.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1464},{"name":"activityTabFullyLoaded","time":1533.6000003814697}],"measures":[],"correlationId":"1d486de3af41c3","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":97,"dbReadsTimeInMs":11,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}