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":772.5999999046326,"ttfb":202.59999990463257,"pageVisibility":"visible","entityId":58009,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"6b0fc34d-1e92-41e2-9c62-f4776a34559b","navigationType":0,"readyForUser":877,"redirectCount":0,"resourceLoadedEnd":522.3999998569489,"resourceLoadedStart":211.20000004768372,"resourceTiming":[{"duration":6.099999904632568,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":211.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":211.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":217.29999995231628,"responseStart":0,"secureConnectionStart":0},{"duration":6.200000047683716,"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":211.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":211.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":217.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":173.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":211.59999990463257,"connectEnd":211.59999990463257,"connectStart":211.59999990463257,"domainLookupEnd":211.59999990463257,"domainLookupStart":211.59999990463257,"fetchStart":211.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":219.09999990463257,"responseEnd":384.7999999523163,"responseStart":264.89999985694885,"secureConnectionStart":211.59999990463257},{"duration":309.89999985694885,"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":212.5,"connectEnd":212.5,"connectStart":212.5,"domainLookupEnd":212.5,"domainLookupStart":212.5,"fetchStart":212.5,"redirectEnd":0,"redirectStart":0,"requestStart":219.89999985694885,"responseEnd":522.3999998569489,"responseStart":273.09999990463257,"secureConnectionStart":212.5},{"duration":44.5,"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":212.59999990463257,"connectEnd":212.59999990463257,"connectStart":212.59999990463257,"domainLookupEnd":212.59999990463257,"domainLookupStart":212.59999990463257,"fetchStart":212.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":220.79999995231628,"responseEnd":257.09999990463257,"responseStart":254.29999995231628,"secureConnectionStart":212.59999990463257},{"duration":46.299999952316284,"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":212.70000004768372,"connectEnd":212.70000004768372,"connectStart":212.70000004768372,"domainLookupEnd":212.70000004768372,"domainLookupStart":212.70000004768372,"fetchStart":212.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":221.79999995231628,"responseEnd":259,"responseStart":257.7000000476837,"secureConnectionStart":212.70000004768372},{"duration":50,"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":212.70000004768372,"connectEnd":212.70000004768372,"connectStart":212.70000004768372,"domainLookupEnd":212.70000004768372,"domainLookupStart":212.70000004768372,"fetchStart":212.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":224,"responseEnd":262.7000000476837,"responseStart":260.89999985694885,"secureConnectionStart":212.70000004768372},{"duration":9.100000143051147,"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":212.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":212.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":222,"responseStart":0,"secureConnectionStart":0},{"duration":50.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":213,"connectEnd":213,"connectStart":213,"domainLookupEnd":213,"domainLookupStart":213,"fetchStart":213,"redirectEnd":0,"redirectStart":0,"requestStart":227.29999995231628,"responseEnd":263.59999990463257,"responseStart":261.7000000476837,"secureConnectionStart":213},{"duration":11.100000143051147,"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":213.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":213.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":224.20000004768372,"responseStart":0,"secureConnectionStart":0},{"duration":51.19999980926514,"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":213.20000004768372,"connectEnd":213.20000004768372,"connectStart":213.20000004768372,"domainLookupEnd":213.20000004768372,"domainLookupStart":213.20000004768372,"fetchStart":213.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":228.39999985694885,"responseEnd":264.39999985694885,"responseStart":262.89999985694885,"secureConnectionStart":213.20000004768372},{"duration":295.2000000476837,"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":213.79999995231628,"connectEnd":213.79999995231628,"connectStart":213.79999995231628,"domainLookupEnd":213.79999995231628,"domainLookupStart":213.79999995231628,"fetchStart":213.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":232.29999995231628,"responseEnd":509,"responseStart":506,"secureConnectionStart":213.79999995231628},{"duration":293.5,"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":214.70000004768372,"connectEnd":214.70000004768372,"connectStart":214.70000004768372,"domainLookupEnd":214.70000004768372,"domainLookupStart":214.70000004768372,"fetchStart":214.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":234.79999995231628,"responseEnd":508.2000000476837,"responseStart":504.39999985694885,"secureConnectionStart":214.70000004768372},{"duration":79.10000014305115,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":522.5999999046326,"connectEnd":522.5999999046326,"connectStart":522.5999999046326,"domainLookupEnd":522.5999999046326,"domainLookupStart":522.5999999046326,"fetchStart":522.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":566,"responseEnd":601.7000000476837,"responseStart":600.3999998569489,"secureConnectionStart":522.5999999046326},{"duration":145.89999985694885,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":731.7000000476837,"connectEnd":731.7000000476837,"connectStart":731.7000000476837,"domainLookupEnd":731.7000000476837,"domainLookupStart":731.7000000476837,"fetchStart":731.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":838.8999998569489,"responseEnd":877.5999999046326,"responseStart":876.0999999046326,"secureConnectionStart":731.7000000476837},{"duration":74.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":765.3999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":765.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":839.8999998569489,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":57,"responseStart":203,"responseEnd":213,"domLoading":206,"domInteractive":939,"domContentLoadedEventStart":939,"domContentLoadedEventEnd":986,"domComplete":1288,"loadEventStart":1288,"loadEventEnd":1289,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":914.5999999046326},{"name":"bigPipe.sidebar-id.end","time":915.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":915.3999998569489},{"name":"bigPipe.activity-panel-pipe-id.end","time":917.7000000476837},{"name":"activityTabFullyLoaded","time":1004}],"measures":[],"correlationId":"1313fa899717f3","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":77,"dbReadsTimeInMs":12,"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)