Type:
Bug
Priority:
Critical
Resolution:
Fixed
Affects Version/s:
N/A
Environment:
bb-11.0 3135acf0bba521cd032cbf18bc6d0775c7346a73
Possibly related to MDEV-30098
CREATE TABLE t1 (a INT ) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT ) ENGINE=MyISAM;
INSERT INTO t2 VALUES (1),(2); # Optional, fails either way
CREATE TABLE t3 (c INT ) ENGINE=MyISAM;
INSERT INTO t3 VALUES (1),(2); # Optional, fails either way
CREATE TABLE t4 (pk INT , f CHAR (8), PRIMARY KEY (pk), KEY (f)) ENGINE=MyISAM;
INSERT INTO t4 VALUES (1, 'o' ),(2, 'x' );
ANALYZE TABLE t1, t2, t3, t4 PERSISTENT FOR ALL ; # Optional, fails either way
SELECT * FROM t1 LEFT JOIN (t2 JOIN t3 ON 1) ON 2 IN ( SELECT pk FROM t4 WHERE f < 's' );
ANALYZE TABLE t4 PERSISTENT FOR ALL ;
# Cleanup
DROP TABLE t1, t2, t3, t4;
bb-11.0 3135acf0b
#3 <signal handler called>
#4 0x00005630d3f0330e in handler_rowid_filter_check (h_arg=0x61d000244ab8) at /data/src/bb-11.0/sql/handler.cc:6953
#5 0x00005630d502c417 in mi_check_index_tuple_real (info=0x61f000016c98, keynr=1, record=0x619000099cc8 "\375\002") at /data/src/bb-11.0/storage/myisam/mi_key.c:557
#6 0x00005630d505ea53 in mi_check_index_tuple (info=0x61f000016c98, keynr=1, record=0x619000099cc8 "\375\002") at /data/src/bb-11.0/storage/myisam/myisamdef.h:752
#7 0x00005630d505f555 in mi_rnext (info=0x61f000016c98, buf=0x619000099cc8 "\375\002", inx=1) at /data/src/bb-11.0/storage/myisam/mi_rnext.c:104
#8 0x00005630d505e79e in mi_rfirst (info=0x61f000016c98, buf=0x619000099cc8 "\375\002", inx=1) at /data/src/bb-11.0/storage/myisam/mi_rfirst.c:26
#9 0x00005630d4fcdd5f in ha_myisam::index_first (this=0x61d000244ab8, buf=0x619000099cc8 "\375\002") at /data/src/bb-11.0/storage/myisam/ha_myisam.cc:2046
#10 0x00005630d3eed851 in handler::ha_index_first (this=0x61d000244ab8, buf=0x619000099cc8 "\375\002") at /data/src/bb-11.0/sql/handler.cc:3711
#11 0x00005630d38fe6f4 in collect_statistics_for_index (thd=0x62b00007e218, table=0x619000099798, index=1) at /data/src/bb-11.0/sql/sql_statistics.cc:2652
#12 0x00005630d38ff8a9 in collect_statistics_for_table (thd=0x62b00007e218, table=0x619000099798) at /data/src/bb-11.0/sql/sql_statistics.cc:2839
#13 0x00005630d3b0ff4e in mysql_admin_table (thd=0x62b00007e218, tables=0x6290000e6340, check_opt=0x62b000083918, operator_name=0x5630d68108e0 <msg_analyze>, lock_type=TL_READ_NO_INSERT, org_open_for_modify=true, repair_table_use_frm=false, extra_open_options=0, prepare_func=0x0, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x5630d3ef7cb0 <handler::ha_analyze(THD*, st_ha_check_opt*)>, view_operator_func=0x0, is_cmd_replicated=true) at /data/src/bb-11.0/sql/sql_admin.cc:986
#14 0x00005630d3b136b4 in Sql_cmd_analyze_table::execute (this=0x6290000e6a70, thd=0x62b00007e218) at /data/src/bb-11.0/sql/sql_admin.cc:1461
#15 0x00005630d36b26c9 in mysql_execute_command (thd=0x62b00007e218, is_called_from_prepared_stmt=false) at /data/src/bb-11.0/sql/sql_parse.cc:5999
#16 0x00005630d36be18a in mysql_parse (thd=0x62b00007e218, rawbuf=0x6290000e6238 "ANALYZE TABLE t4 PERSISTENT FOR ALL", length=35, parser_state=0x7f6a52cfdad0) at /data/src/bb-11.0/sql/sql_parse.cc:7998
#17 0x00005630d3696caf in dispatch_command (command=COM_QUERY, thd=0x62b00007e218, packet=0x629000253219 "", packet_length=35, blocking=true) at /data/src/bb-11.0/sql/sql_parse.cc:1894
#18 0x00005630d369411e in do_command (thd=0x62b00007e218, blocking=true) at /data/src/bb-11.0/sql/sql_parse.cc:1407
#19 0x00005630d3adb4a3 in do_handle_one_connection (connect=0x608000002638, put_in_cache=true) at /data/src/bb-11.0/sql/sql_connect.cc:1416
#20 0x00005630d3adae64 in handle_one_connection (arg=0x6080000025b8) at /data/src/bb-11.0/sql/sql_connect.cc:1318
#21 0x00005630d45cd99a in pfs_spawn_thread (arg=0x617000004d98) at /data/src/bb-11.0/storage/perfschema/pfs.cc:2201
#22 0x00007f6a5c4bfea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#23 0x00007f6a5c0aeaef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
is caused by
MDEV-26974
Improve selectivity and related costs in optimizer
Closed
{"report":{"fcp":1096.5999994277954,"ttfb":258.3999996185303,"pageVisibility":"visible","entityId":117220,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"033b6c20-0da5-4881-830e-09677fab601c","navigationType":0,"readyForUser":1186.5,"redirectCount":0,"resourceLoadedEnd":1357.1999998092651,"resourceLoadedStart":264.5999994277954,"resourceTiming":[{"duration":320.9000005722046,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":264.5999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":264.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":585.5,"responseStart":0,"secureConnectionStart":0},{"duration":320.8999996185303,"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":264.8999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":264.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":585.7999992370605,"responseStart":0,"secureConnectionStart":0},{"duration":330.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":265.0999994277954,"connectEnd":265.0999994277954,"connectStart":265.0999994277954,"domainLookupEnd":265.0999994277954,"domainLookupStart":265.0999994277954,"fetchStart":265.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":265.0999994277954,"responseEnd":595.5999994277954,"responseStart":595.5999994277954,"secureConnectionStart":265.0999994277954},{"duration":368.30000019073486,"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":265.3999996185303,"connectEnd":265.3999996185303,"connectStart":265.3999996185303,"domainLookupEnd":265.3999996185303,"domainLookupStart":265.3999996185303,"fetchStart":265.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":265.3999996185303,"responseEnd":633.6999998092651,"responseStart":633.6999998092651,"secureConnectionStart":265.3999996185303},{"duration":371.9000005722046,"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":265.79999923706055,"connectEnd":265.79999923706055,"connectStart":265.79999923706055,"domainLookupEnd":265.79999923706055,"domainLookupStart":265.79999923706055,"fetchStart":265.79999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":265.79999923706055,"responseEnd":637.6999998092651,"responseStart":637.6999998092651,"secureConnectionStart":265.79999923706055},{"duration":372.1000003814697,"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":266.0999994277954,"connectEnd":266.0999994277954,"connectStart":266.0999994277954,"domainLookupEnd":266.0999994277954,"domainLookupStart":266.0999994277954,"fetchStart":266.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":266.0999994277954,"responseEnd":638.1999998092651,"responseStart":638.1999998092651,"secureConnectionStart":266.0999994277954},{"duration":372.20000076293945,"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":266.29999923706055,"connectEnd":266.29999923706055,"connectStart":266.29999923706055,"domainLookupEnd":266.29999923706055,"domainLookupStart":266.29999923706055,"fetchStart":266.29999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":266.29999923706055,"responseEnd":638.5,"responseStart":638.5,"secureConnectionStart":266.29999923706055},{"duration":476,"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":266.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":266.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":742.3999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":372.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":266.5999994277954,"connectEnd":266.5999994277954,"connectStart":266.5999994277954,"domainLookupEnd":266.5999994277954,"domainLookupStart":266.5999994277954,"fetchStart":266.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":266.5999994277954,"responseEnd":639.0999994277954,"responseStart":639.0999994277954,"secureConnectionStart":266.5999994277954},{"duration":475.70000076293945,"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":266.79999923706055,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":266.79999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":742.5,"responseStart":0,"secureConnectionStart":0},{"duration":373.1000003814697,"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":266.8999996185303,"connectEnd":266.8999996185303,"connectStart":266.8999996185303,"domainLookupEnd":266.8999996185303,"domainLookupStart":266.8999996185303,"fetchStart":266.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":266.8999996185303,"responseEnd":640,"responseStart":640,"secureConnectionStart":266.8999996185303},{"duration":548.9000005722046,"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":267.79999923706055,"connectEnd":267.79999923706055,"connectStart":267.79999923706055,"domainLookupEnd":267.79999923706055,"domainLookupStart":267.79999923706055,"fetchStart":267.79999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":267.79999923706055,"responseEnd":816.6999998092651,"responseStart":816.6999998092651,"secureConnectionStart":267.79999923706055},{"duration":1073.7000007629395,"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":267.79999923706055,"connectEnd":267.79999923706055,"connectStart":267.79999923706055,"domainLookupEnd":267.79999923706055,"domainLookupStart":267.79999923706055,"fetchStart":267.79999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":267.79999923706055,"responseEnd":1341.5,"responseStart":1341.5,"secureConnectionStart":267.79999923706055},{"duration":75.09999942779541,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":755.6999998092651,"connectEnd":755.6999998092651,"connectStart":755.6999998092651,"domainLookupEnd":755.6999998092651,"domainLookupStart":755.6999998092651,"fetchStart":755.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":755.6999998092651,"responseEnd":830.7999992370605,"responseStart":830.7999992370605,"secureConnectionStart":755.6999998092651},{"duration":322,"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":1020.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1020.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1342.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":335.5,"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":1021.6999998092651,"connectEnd":1021.6999998092651,"connectStart":1021.6999998092651,"domainLookupEnd":1021.6999998092651,"domainLookupStart":1021.6999998092651,"fetchStart":1021.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1021.6999998092651,"responseEnd":1357.1999998092651,"responseStart":1357.1999998092651,"secureConnectionStart":1021.6999998092651},{"duration":349.80000019073486,"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":1022.0999994277954,"connectEnd":1022.0999994277954,"connectStart":1022.0999994277954,"domainLookupEnd":1022.0999994277954,"domainLookupStart":1022.0999994277954,"fetchStart":1022.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":1022.0999994277954,"responseEnd":1371.8999996185303,"responseStart":1371.8999996185303,"secureConnectionStart":1022.0999994277954}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":73,"responseStart":258,"responseEnd":260,"domLoading":262,"domInteractive":1365,"domContentLoadedEventStart":1366,"domContentLoadedEventEnd":1409,"domComplete":2483,"loadEventStart":2483,"loadEventEnd":2485,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1346.2999992370605},{"name":"bigPipe.sidebar-id.end","time":1347.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":1347.2999992370605},{"name":"bigPipe.activity-panel-pipe-id.end","time":1349.6999998092651},{"name":"activityTabFullyLoaded","time":1417.6999998092651}],"measures":[],"correlationId":"ec5c36ab23d1f4","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":92,"dbReadsTimeInMs":10,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}