Note: the query is rather weird, but it is a crash, even on release binaries...
CREATE TABLE t1 (f1 INT) ENGINE=MyISAM;
|
INSERT INTO t1 VALUES (5),(9);
|
|
CREATE TABLE t2 (f2 INT) ENGINE=MyISAM;
|
INSERT INTO t2 VALUES (0),(6);
|
|
CREATE TABLE t3 (f3 INT) ENGINE=MyISAM;
|
INSERT INTO t3 VALUES (6),(3);
|
|
CREATE TABLE t4 (f4 INT) ENGINE=MyISAM;
|
INSERT INTO t4 VALUES (1),(0);
|
|
SELECT
|
( SELECT MIN(f1) FROM t1 WHERE f1 IN ( SELECT MIN(f4) FROM t2 ) ) AS field7,
|
( SELECT COUNT(*) FROM t3 WHERE f3 IN ( SELECT MAX(f4) FROM t2 GROUP BY field7 ) )
|
FROM t4;
|
Stack trace from 5.5 commit 86f46a3da4a6d82cb510dc4c270d46cfd6a8965b
|
#3 <signal handler called>
|
#4 0x000000000087c84c in Item_subselect::enumerate_field_refs_processor (this=0x7f16bba88e50, arg=0x7f16bc3b3b50 "0I7\001") at 5.5/sql/item_subselect.cc:315
|
#5 0x000000000087d212 in Item_subselect::walk (this=0x7f16bba88e50, processor=&virtual table offset 688, walk_subquery=false, argument=0x7f16bc3b3b50 "0I7\001") at 5.5/sql/item_subselect.cc:631
|
#6 0x000000000080822b in Item_ref::fix_fields (this=0x7f16bb935b80, thd=0x7f16bc950060, reference=0x7f16bb930468) at 5.5/sql/item.cc:7034
|
#7 0x0000000000802eaa in Item_field::fix_outer_field (this=0x7f16bb930358, thd=0x7f16bc950060, from_field=0x7f16bc3b3cf8, reference=0x7f16bb930468) at 5.5/sql/item.cc:5005
|
#8 0x00000000008034cb in Item_field::fix_fields (this=0x7f16bb930358, thd=0x7f16bc950060, reference=0x7f16bb930468) at 5.5/sql/item.cc:5172
|
#9 0x0000000000696352 in find_order_in_list (thd=0x7f16bc950060, ref_pointer_array=0x7f16bb933d18, tables=0x7f16bb92fd68, order=0x7f16bb930458, fields=..., all_fields=..., is_group_field=true) at 5.5/sql/sql_select.cc:20559
|
#10 0x0000000000696576 in setup_group (thd=0x7f16bc950060, ref_pointer_array=0x7f16bb933d18, tables=0x7f16bb92fd68, fields=..., all_fields=..., order=0x7f16bb930458, hidden_group_fields=0x7f16bb935898) at 5.5/sql/sql_select.cc:20637
|
#11 0x00000000006a4c38 in setup_without_group (thd=0x7f16bc950060, ref_pointer_array=0x7f16bb933d18, tables=0x7f16bb92fd68, leaves=..., fields=..., all_fields=..., conds=0x7f16bb9359b0, order=0x0, group=0x7f16bb930458, hidden_group_fields=0x7f16bb935898) at 5.5/sql/sql_select.cc:587
|
#12 0x0000000000663da4 in JOIN::prepare (this=0x7f16bb9355a0, rref_pointer_array=0x7f16bb92f2e8, tables_init=0x7f16bb92fd68, wild_num=0, conds_init=0x0, og_num=1, order_init=0x0, skip_order_by=false, group_init=0x7f16bb930458, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f16bb92f078, unit_arg=0x7f16bb92f3d8) at 5.5/sql/sql_select.cc:727
|
#13 0x0000000000883bfa in subselect_single_select_engine::prepare (this=0x7f16bb930638) at 5.5/sql/item_subselect.cc:3025
|
#14 0x000000000087c4eb in Item_subselect::fix_fields (this=0x7f16bb930498, thd_param=0x7f16bc950060, ref=0x7f16bb935488) at 5.5/sql/item_subselect.cc:245
|
#15 0x0000000000882f26 in Item_in_subselect::fix_fields (this=0x7f16bb930498, thd_arg=0x7f16bc950060, ref=0x7f16bb935488) at 5.5/sql/item_subselect.cc:2708
|
#16 0x00000000005e4040 in setup_conds (thd=0x7f16bc950060, tables=0x7f16bb96a920, leaves=..., conds=0x7f16bb935488) at 5.5/sql/sql_base.cc:8894
|
#17 0x00000000006a4b3a in setup_without_group (thd=0x7f16bc950060, ref_pointer_array=0x7f16bb933bc8, tables=0x7f16bb96a920, leaves=..., fields=..., all_fields=..., conds=0x7f16bb935488, order=0x0, group=0x0, hidden_group_fields=0x7f16bb935370) at 5.5/sql/sql_select.cc:577
|
#18 0x0000000000663da4 in JOIN::prepare (this=0x7f16bb935078, rref_pointer_array=0x7f16bb969f98, tables_init=0x7f16bb96a920, wild_num=0, conds_init=0x7f16bb930498, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f16bb969d28, unit_arg=0x7f16bb96a088) at 5.5/sql/sql_select.cc:727
|
#19 0x0000000000883bfa in subselect_single_select_engine::prepare (this=0x7f16bb9307b0) at 5.5/sql/item_subselect.cc:3025
|
#20 0x000000000087c4eb in Item_subselect::fix_fields (this=0x7f16bb930678, thd_param=0x7f16bc950060, ref=0x7f16bb9307f8) at 5.5/sql/item_subselect.cc:245
|
#21 0x00000000005e2368 in setup_fields (thd=0x7f16bc950060, ref_pointer_array=0x7f16bb9325a0, fields=..., mark_used_columns=MARK_COLUMNS_READ, sum_func_list=0x7f16bb9323a0, allow_sum_func=true) at 5.5/sql/sql_base.cc:8169
|
#22 0x0000000000663cec in JOIN::prepare (this=0x7f16bb932078, rref_pointer_array=0x7f16bc953cd0, tables_init=0x7f16bb930930, wild_num=0, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f16bc953a60, unit_arg=0x7f16bc953380) at 5.5/sql/sql_select.cc:723
|
#23 0x000000000066c43b in mysql_select (thd=0x7f16bc950060, rref_pointer_array=0x7f16bc953cd0, tables=0x7f16bb930930, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f16bb930fd0, unit=0x7f16bc953380, select_lex=0x7f16bc953a60) at 5.5/sql/sql_select.cc:3074
|
#24 0x0000000000662fbd in handle_select (thd=0x7f16bc950060, lex=0x7f16bc9532d0, result=0x7f16bb930fd0, setup_tables_done_option=0) at 5.5/sql/sql_select.cc:319
|
#25 0x000000000063c1fc in execute_sqlcom_select (thd=0x7f16bc950060, all_tables=0x7f16bb930930) at 5.5/sql/sql_parse.cc:4689
|
#26 0x00000000006353de in mysql_execute_command (thd=0x7f16bc950060) at 5.5/sql/sql_parse.cc:2234
|
#27 0x000000000063ece2 in mysql_parse (thd=0x7f16bc950060, rawbuf=0x7f16bba87078 "SELECT \n( SELECT MIN(f1) FROM t1 WHERE f1 IN ( SELECT MIN(f4) FROM t2 ) ) AS field7,\n( SELECT COUNT(*) FROM t3 WHERE f3 IN ( SELECT MAX(f4) FROM t2 GROUP BY field7 ) )\nFROM t4", length=175, parser_state=0x7f16bc3b5620) at 5.5/sql/sql_parse.cc:5909
|
#28 0x0000000000632925 in dispatch_command (command=COM_QUERY, thd=0x7f16bc950060, packet=0x7f16bca09061 "SELECT \n( SELECT MIN(f1) FROM t1 WHERE f1 IN ( SELECT MIN(f4) FROM t2 ) ) AS field7,\n( SELECT COUNT(*) FROM t3 WHERE f3 IN ( SELECT MAX(f4) FROM t2 GROUP BY field7 ) )\nFROM t4", packet_length=175) at 5.5/sql/sql_parse.cc:1079
|
#29 0x0000000000631ab1 in do_command (thd=0x7f16bc950060) at 5.5/sql/sql_parse.cc:793
|
#30 0x0000000000734122 in do_handle_one_connection (thd_arg=0x7f16bc950060) at 5.5/sql/sql_connect.cc:1266
|
#31 0x0000000000733be1 in handle_one_connection (arg=0x7f16bc950060) at 5.5/sql/sql_connect.cc:1181
|
#32 0x0000000000b6c629 in pfs_spawn_thread (arg=0x7f16bc971fc0) at 5.5/storage/perfschema/pfs.cc:1015
|
#33 0x00007f16c2b46b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
|
#34 0x00007f16c0dfc70d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
|
- relates to
-
MDEV-13180
Unused left join causes server crash
-
-
Closed
{"report":{"fcp":1394.1999998092651,"ttfb":465.90000009536743,"pageVisibility":"visible","entityId":50613,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"af21cc03-2a12-45bc-be7a-9d7947e26caf","navigationType":0,"readyForUser":1488.8000001907349,"redirectCount":0,"resourceLoadedEnd":1594.4000000953674,"resourceLoadedStart":471.5,"resourceTiming":[{"duration":378.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":471.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":471.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":849.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":378.3999996185303,"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":471.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":471.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":850.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":441,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":472,"connectEnd":472,"connectStart":472,"domainLookupEnd":472,"domainLookupStart":472,"fetchStart":472,"redirectEnd":0,"redirectStart":0,"requestStart":472,"responseEnd":913,"responseStart":913,"secureConnectionStart":472},{"duration":493.6000003814697,"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":472.19999980926514,"connectEnd":472.19999980926514,"connectStart":472.19999980926514,"domainLookupEnd":472.19999980926514,"domainLookupStart":472.19999980926514,"fetchStart":472.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":472.19999980926514,"responseEnd":965.8000001907349,"responseStart":965.8000001907349,"secureConnectionStart":472.19999980926514},{"duration":497.40000009536743,"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":472.40000009536743,"connectEnd":472.40000009536743,"connectStart":472.40000009536743,"domainLookupEnd":472.40000009536743,"domainLookupStart":472.40000009536743,"fetchStart":472.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":472.40000009536743,"responseEnd":969.8000001907349,"responseStart":969.8000001907349,"secureConnectionStart":472.40000009536743},{"duration":497.5,"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":472.59999990463257,"connectEnd":472.59999990463257,"connectStart":472.59999990463257,"domainLookupEnd":472.59999990463257,"domainLookupStart":472.59999990463257,"fetchStart":472.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":472.59999990463257,"responseEnd":970.0999999046326,"responseStart":970.0999999046326,"secureConnectionStart":472.59999990463257},{"duration":497.69999980926514,"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":472.80000019073486,"connectEnd":472.80000019073486,"connectStart":472.80000019073486,"domainLookupEnd":472.80000019073486,"domainLookupStart":472.80000019073486,"fetchStart":472.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":472.80000019073486,"responseEnd":970.5,"responseStart":970.5,"secureConnectionStart":472.80000019073486},{"duration":586.0999999046326,"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":472.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":472.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1059,"responseStart":0,"secureConnectionStart":0},{"duration":497.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":473.09999990463257,"connectEnd":473.09999990463257,"connectStart":473.09999990463257,"domainLookupEnd":473.09999990463257,"domainLookupStart":473.09999990463257,"fetchStart":473.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":473.09999990463257,"responseEnd":970.9000000953674,"responseStart":970.9000000953674,"secureConnectionStart":473.09999990463257},{"duration":586,"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":473.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":473.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1059.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":498.19999980926514,"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":473.40000009536743,"connectEnd":473.40000009536743,"connectStart":473.40000009536743,"domainLookupEnd":473.40000009536743,"domainLookupStart":473.40000009536743,"fetchStart":473.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":473.40000009536743,"responseEnd":971.5999999046326,"responseStart":971.5999999046326,"secureConnectionStart":473.40000009536743},{"duration":823.2999997138977,"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":478.90000009536743,"connectEnd":478.90000009536743,"connectStart":478.90000009536743,"domainLookupEnd":478.90000009536743,"domainLookupStart":478.90000009536743,"fetchStart":478.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":478.90000009536743,"responseEnd":1302.1999998092651,"responseStart":1302.1999998092651,"secureConnectionStart":478.90000009536743},{"duration":1083.8000001907349,"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":479.59999990463257,"connectEnd":479.59999990463257,"connectStart":479.59999990463257,"domainLookupEnd":479.59999990463257,"domainLookupStart":479.59999990463257,"fetchStart":479.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":479.59999990463257,"responseEnd":1563.4000000953674,"responseStart":1563.4000000953674,"secureConnectionStart":479.59999990463257},{"duration":237.40000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1072.0999999046326,"connectEnd":1072.0999999046326,"connectStart":1072.0999999046326,"domainLookupEnd":1072.0999999046326,"domainLookupStart":1072.0999999046326,"fetchStart":1072.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1072.0999999046326,"responseEnd":1309.5,"responseStart":1309.5,"secureConnectionStart":1072.0999999046326},{"duration":255.90000009536743,"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":1338.5,"connectEnd":1338.5,"connectStart":1338.5,"domainLookupEnd":1338.5,"domainLookupStart":1338.5,"fetchStart":1338.5,"redirectEnd":0,"redirectStart":0,"requestStart":1338.5,"responseEnd":1594.4000000953674,"responseStart":1594.4000000953674,"secureConnectionStart":1338.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":286,"responseStart":466,"responseEnd":477,"domLoading":470,"domInteractive":1638,"domContentLoadedEventStart":1638,"domContentLoadedEventEnd":1690,"domComplete":2089,"loadEventStart":2089,"loadEventEnd":2090,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1567.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1568.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1568.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1572.3000001907349},{"name":"activityTabFullyLoaded","time":1708.4000000953674}],"measures":[],"correlationId":"3789f6600d7d45","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":111,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Looks like the problem is in name resolution code. Re-assigning to Sanja.