Here's a query that crashes:
analyze format=json
|
with recursive src(counter) as
|
(select 1
|
union
|
select counter+1 from src where counter<10
|
) select * from src
|
Program received signal SIGSEGV, Segmentation fault.
|
[Switching to Thread 0x7ffff43b7300 (LWP 1045)]
|
0x0000555555d43a10 in Item_field::print (this=0x7fff98012b98, str=0x7ffff43b4430, query_type=QT_EXPLAIN) at /home/psergey/dev-git/10.2/sql/item.cc:6899
|
(gdb) p this
|
$2 = (Item_field * const) 0x7fff98012b98
|
(gdb) p field
|
$4 = (Field *) 0x7fff9801eaa8
|
(gdb) p field->table
|
$6 = (TABLE *) 0x8f8f8f8f8f8f8f8f
|
(gdb) p this->fixed
|
$8 = true
|
(gdb) wher
|
#0 0x0000555555d43a10 in Item_field::print (this=0x7fff98012b98, str=0x7ffff43b4430, query_type=QT_EXPLAIN) at /home/psergey/dev-git/10.2/sql/item.cc:6899
|
#1 0x0000555555d8951c in Item_func::print_op (this=0x7fff98012d28, str=0x7ffff43b4430, query_type=QT_EXPLAIN) at /home/psergey/dev-git/10.2/sql/item_func.cc:477
|
#2 0x0000555555d6aa57 in Item_bool_rowready_func2::print (this=0x7fff98012d28, str=0x7ffff43b4430, query_type=QT_EXPLAIN) at /home/psergey/dev-git/10.2/sql/item_cmpfunc.h:481
|
#3 0x0000555555c4070b in write_item (writer=0x7ffff43b4b80, item=0x7fff98012d28) at /home/psergey/dev-git/10.2/sql/sql_explain.cc:1346
|
#4 0x0000555555c409ce in Explain_table_access::tag_to_json (this=0x7fff98021488, writer=0x7ffff43b4b80, tag=ET_USING_WHERE) at /home/psergey/dev-git/10.2/sql/sql_explain.cc:1404
|
#5 0x0000555555c41569 in Explain_table_access::print_explain_json (this=0x7fff98021488, query=0x7fff980151c0, writer=0x7ffff43b4b80, is_analyze=true) at /home/psergey/dev-git/10.2/sql/sql_explain.cc:1651
|
#6 0x0000555555c3f52c in Explain_basic_join::print_explain_json_interns (this=0x7fff98016c80, query=0x7fff980151c0, writer=0x7ffff43b4b80, is_analyze=true) at /home/psergey/dev-git/10.2/sql/sql_explain.cc:1000
|
#7 0x0000555555c3f0c0 in Explain_select::print_explain_json (this=0x7fff98016c80, query=0x7fff980151c0, writer=0x7ffff43b4b80, is_analyze=true) at /home/psergey/dev-git/10.2/sql/sql_explain.cc:905
|
#8 0x0000555555c3e24a in Explain_union::print_explain_json (this=0x7fff980234b0, query=0x7fff980151c0, writer=0x7ffff43b4b80, is_analyze=true) at /home/psergey/dev-git/10.2/sql/sql_explain.cc:585
|
#9 0x0000555555c41841 in Explain_table_access::print_explain_json (this=0x7fff98022fa0, query=0x7fff980151c0, writer=0x7ffff43b4b80, is_analyze=true) at /home/psergey/dev-git/10.2/sql/sql_explain.cc:1691
|
#10 0x0000555555c3f52c in Explain_basic_join::print_explain_json_interns (this=0x7fff98022ea0, query=0x7fff980151c0, writer=0x7ffff43b4b80, is_analyze=true) at /home/psergey/dev-git/10.2/sql/sql_explain.cc:1000
|
#11 0x0000555555c3f0c0 in Explain_select::print_explain_json (this=0x7fff98022ea0, query=0x7fff980151c0, writer=0x7ffff43b4b80, is_analyze=true) at /home/psergey/dev-git/10.2/sql/sql_explain.cc:905
|
#12 0x0000555555c3ccca in Explain_query::print_explain_json (this=0x7fff980151c0, output=0x7fff98023688, is_analyze=true) at /home/psergey/dev-git/10.2/sql/sql_explain.cc:224
|
#13 0x0000555555c3ca0d in Explain_query::send_explain (this=0x7fff980151c0, thd=0x7fff98000b00) at /home/psergey/dev-git/10.2/sql/sql_explain.cc:167
|
#14 0x0000555555ad87ba in execute_sqlcom_select (thd=0x7fff98000b00, all_tables=0x7fff980130c0) at /home/psergey/dev-git/10.2/sql/sql_parse.cc:6345
|
#15 0x0000555555ace2ac in mysql_execute_command (thd=0x7fff98000b00) at /home/psergey/dev-git/10.2/sql/sql_parse.cc:3364
|
#16 0x0000555555adbe46 in mysql_parse (thd=0x7fff98000b00, rawbuf=0x7fff98010d58 "analyze format=json with recursive src(counter) as (select 1 union select counter+1 from src where counter<10) select * from src", length=128, parser_state=0x7ffff43b5ca0, is_com_multi=false, is_next_command=false) at /home/psergey/dev-git/10.2/sql/sql_parse.cc:7759
|
#17 0x0000555555ac9fa8 in dispatch_command (command=COM_QUERY, thd=0x7fff98000b00, packet=0x7fff98008611 "", packet_length=128, is_com_multi=false, is_next_command=false) at /home/psergey/dev-git/10.2/sql/sql_parse.cc:1793
|
#18 0x0000555555ac89c4 in do_command (thd=0x7fff98000b00) at /home/psergey/dev-git/10.2/sql/sql_parse.cc:1353
|
{"report":{"fcp":930.2000000476837,"ttfb":215,"pageVisibility":"visible","entityId":58009,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"5319645d-2b42-4c47-b4e5-766a9b7e04ed","navigationType":0,"readyForUser":1006.7999999523163,"redirectCount":0,"resourceLoadedEnd":977.7000000476837,"resourceLoadedStart":239.59999990463257,"resourceTiming":[{"duration":168.79999995231628,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":239.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":408.39999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":168.80000019073486,"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":239.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":408.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":185.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":240.09999990463257,"connectEnd":240.09999990463257,"connectStart":240.09999990463257,"domainLookupEnd":240.09999990463257,"domainLookupStart":240.09999990463257,"fetchStart":240.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":240.09999990463257,"responseEnd":425.59999990463257,"responseStart":425.59999990463257,"secureConnectionStart":240.09999990463257},{"duration":261.10000014305115,"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":240.59999990463257,"connectEnd":240.59999990463257,"connectStart":240.59999990463257,"domainLookupEnd":240.59999990463257,"domainLookupStart":240.59999990463257,"fetchStart":240.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":240.59999990463257,"responseEnd":501.7000000476837,"responseStart":501.7000000476837,"secureConnectionStart":240.59999990463257},{"duration":264.10000014305115,"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":240.89999985694885,"connectEnd":240.89999985694885,"connectStart":240.89999985694885,"domainLookupEnd":240.89999985694885,"domainLookupStart":240.89999985694885,"fetchStart":240.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":240.89999985694885,"responseEnd":505,"responseStart":505,"secureConnectionStart":240.89999985694885},{"duration":264.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":241,"connectEnd":241,"connectStart":241,"domainLookupEnd":241,"domainLookupStart":241,"fetchStart":241,"redirectEnd":0,"redirectStart":0,"requestStart":241,"responseEnd":505.5,"responseStart":505.5,"secureConnectionStart":241},{"duration":323.2000000476837,"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":241.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":241.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":564.5,"responseStart":0,"secureConnectionStart":0},{"duration":264.59999990463257,"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":241.29999995231628,"connectEnd":241.29999995231628,"connectStart":241.29999995231628,"domainLookupEnd":241.29999995231628,"domainLookupStart":241.29999995231628,"fetchStart":241.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":241.29999995231628,"responseEnd":505.89999985694885,"responseStart":505.89999985694885,"secureConnectionStart":241.29999995231628},{"duration":264.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":241.59999990463257,"connectEnd":241.59999990463257,"connectStart":241.59999990463257,"domainLookupEnd":241.59999990463257,"domainLookupStart":241.59999990463257,"fetchStart":241.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":241.59999990463257,"responseEnd":506.2999999523163,"responseStart":506.2999999523163,"secureConnectionStart":241.59999990463257},{"duration":322.89999985694885,"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":241.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":241.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":564.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":264.90000009536743,"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":241.89999985694885,"connectEnd":241.89999985694885,"connectStart":241.89999985694885,"domainLookupEnd":241.89999985694885,"domainLookupStart":241.89999985694885,"fetchStart":241.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":241.89999985694885,"responseEnd":506.7999999523163,"responseStart":506.7999999523163,"secureConnectionStart":241.89999985694885},{"duration":335.2000000476837,"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":245.59999990463257,"connectEnd":245.59999990463257,"connectStart":245.59999990463257,"domainLookupEnd":245.59999990463257,"domainLookupStart":245.59999990463257,"fetchStart":245.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":245.59999990463257,"responseEnd":580.7999999523163,"responseStart":580.7999999523163,"secureConnectionStart":245.59999990463257},{"duration":363.7999999523163,"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":254,"connectEnd":254,"connectStart":254,"domainLookupEnd":254,"domainLookupStart":254,"fetchStart":254,"redirectEnd":0,"redirectStart":0,"requestStart":254,"responseEnd":617.7999999523163,"responseStart":617.7999999523163,"secureConnectionStart":254},{"duration":26.399999856948853,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":592,"connectEnd":592,"connectStart":592,"domainLookupEnd":592,"domainLookupStart":592,"fetchStart":592,"redirectEnd":0,"redirectStart":0,"requestStart":592,"responseEnd":618.3999998569489,"responseStart":618.3999998569489,"secureConnectionStart":592},{"duration":356.10000014305115,"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":621.5999999046326,"connectEnd":621.5999999046326,"connectStart":621.5999999046326,"domainLookupEnd":621.5999999046326,"domainLookupStart":621.5999999046326,"fetchStart":621.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":621.5999999046326,"responseEnd":977.7000000476837,"responseStart":977.7000000476837,"secureConnectionStart":621.5999999046326},{"duration":194.39999985694885,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":923.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":923.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1118.0999999046326,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":42,"responseStart":215,"responseEnd":254,"domLoading":219,"domInteractive":1126,"domContentLoadedEventStart":1126,"domContentLoadedEventEnd":1186,"domComplete":1436,"loadEventStart":1436,"loadEventEnd":1437,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1093.5999999046326},{"name":"bigPipe.sidebar-id.end","time":1094.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":1094.8999998569489},{"name":"bigPipe.activity-panel-pipe-id.end","time":1097.2999999523163},{"name":"activityTabFullyLoaded","time":1204.3999998569489}],"measures":[],"correlationId":"a29a624269fc29","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":99,"dbReadsTimeInMs":10,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
The query itself works:
MariaDB [ontime]> with recursive src(counter) as (select 1 union select counter+1 from src where counter<10) select * from src;
+---------+
| counter |
+---------+
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 |
| 8 |
| 9 |
| 10 |
+---------+
10 rows in set (0.01 sec)
and so does the tabular ANALYZE:
MariaDB [test]> analyze with recursive src(counter) as (select 1 union select counter+1 from src where counter<10) select * from src;
+------+-----------------+------------+------+---------------+------+---------+------+------+--------+----------+------------+----------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | r_rows | filtered | r_filtered | Extra |
+------+-----------------+------------+------+---------------+------+---------+------+------+--------+----------+------------+----------------+
| 1 | PRIMARY | <derived2> | ALL | NULL | NULL | NULL | NULL | 2 | 10.00 | 100.00 | 100.00 | |
| 2 | SUBQUERY | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | No tables used |
| 3 | RECURSIVE UNION | <derived2> | ALL | NULL | NULL | NULL | NULL | 2 | 1.00 | 100.00 | 90.00 | Using where |
| NULL | UNION RESULT | <union2,3> | ALL | NULL | NULL | NULL | NULL | NULL | 0.00 | NULL | NULL | |
+------+-----------------+------------+------+---------------+------+---------+------+------+--------+----------+------------+----------------+
4 rows in set (0.00 sec)