When the following SQL is executed, the server crashes.
select avg(1) over (order by avg(1));
|
This also crashes with an actual table in the query.
create table test.t1 (id int);
|
insert into test.t1 values (1), (2), (3);
|
select avg(id) over (order by avg(id)) from test.t1);
|
The commit ID the server was built from is c35b8c46b404d035e54a23d667da5dff6502fc2e. I've attached the error log from the crash.
#3 <signal handler called>
|
#4 JOIN::make_aggr_tables_info (this=this@entry=0x7fac02cf28f8) at /data/src/10.2/sql/sql_select.cc:2713
|
#5 0x00007fac4af421f3 in JOIN::optimize_inner (this=this@entry=0x7fac02cf28f8) at /data/src/10.2/sql/sql_select.cc:1442
|
#6 0x00007fac4af4522f in JOIN::optimize (this=this@entry=0x7fac02cf28f8) at /data/src/10.2/sql/sql_select.cc:1076
|
#7 0x00007fac4af45bd5 in mysql_select (thd=thd@entry=0x7fac02d14070, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fac02cf28d8, unit=0x7fac02d17b48, select_lex=0x7fac02d18278) at /data/src/10.2/sql/sql_select.cc:3570
|
#8 0x00007fac4af45e8d in handle_select (thd=thd@entry=0x7fac02d14070, lex=lex@entry=0x7fac02d17a80, result=result@entry=0x7fac02cf28d8, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.2/sql/sql_select.cc:373
|
#9 0x00007fac4aed6849 in execute_sqlcom_select (thd=thd@entry=0x7fac02d14070, all_tables=0x0) at /data/src/10.2/sql/sql_parse.cc:6347
|
#10 0x00007fac4aedf6d2 in mysql_execute_command (thd=thd@entry=0x7fac02d14070) at /data/src/10.2/sql/sql_parse.cc:3370
|
#11 0x00007fac4aee92d2 in mysql_parse (thd=thd@entry=0x7fac02d14070, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7fac4bec6910, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:7790
|
#12 0x00007fac4aeeb55b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7fac02d14070, packet=packet@entry=0x7fac02e18071 "select avg(1) over (order by avg(1))", packet_length=packet_length@entry=36, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:1799
|
#13 0x00007fac4aeee08d in do_command (thd=0x7fac02d14070) at /data/src/10.2/sql/sql_parse.cc:1359
|
#14 0x00007fac4afdbf4a in do_handle_one_connection (connect=connect@entry=0x7fac48060130) at /data/src/10.2/sql/sql_connect.cc:1354
|
#15 0x00007fac4afdc133 in handle_one_connection (arg=0x7fac48060130) at /data/src/10.2/sql/sql_connect.cc:1260
|
#16 0x00007fac4a5dd0a4 in start_thread (arg=0x7fac4bec8300) at pthread_create.c:309
|
#17 0x00007fac48dfd87d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
|
- relates to
-
MDEV-11138
Server crashes in JOIN::make_aggr_tables_info on SELECT ROW_NUMBER() OVER ()
-
-
Closed
{"report":{"fcp":4591,"ttfb":433.80000001192093,"pageVisibility":"visible","entityId":59406,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0,"journeyId":"2048c42b-3fba-4aac-8485-e80f7c9bf221","navigationType":0,"readyForUser":4672,"redirectCount":0,"resourceLoadedEnd":4522.4000000059605,"resourceLoadedStart":438.6000000089407,"resourceTiming":[{"duration":22.399999991059303,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":438.6000000089407,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":438.6000000089407,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":461,"responseStart":0,"secureConnectionStart":0},{"duration":24.19999998807907,"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":438.80000001192093,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":438.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":463,"responseStart":0,"secureConnectionStart":0},{"duration":948.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":439,"connectEnd":439,"connectStart":439,"domainLookupEnd":439,"domainLookupStart":439,"fetchStart":439,"redirectEnd":0,"redirectStart":0,"requestStart":1316.5,"responseEnd":1387.5,"responseStart":1353,"secureConnectionStart":439},{"duration":974.0999999940395,"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":439.1000000089407,"connectEnd":439.1000000089407,"connectStart":439.1000000089407,"domainLookupEnd":439.1000000089407,"domainLookupStart":439.1000000089407,"fetchStart":439.1000000089407,"redirectEnd":0,"redirectStart":0,"requestStart":1320.6000000089407,"responseEnd":1413.2000000029802,"responseStart":1365.6000000089407,"secureConnectionStart":439.1000000089407},{"duration":907.1999999880791,"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":439.30000001192093,"connectEnd":439.30000001192093,"connectStart":439.30000001192093,"domainLookupEnd":439.30000001192093,"domainLookupStart":439.30000001192093,"fetchStart":439.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":1320.2000000029802,"responseEnd":1346.5,"responseStart":1346,"secureConnectionStart":439.30000001192093},{"duration":892.5999999940395,"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":443.6000000089407,"connectEnd":1319.800000011921,"connectStart":1319.800000011921,"domainLookupEnd":1319.800000011921,"domainLookupStart":1319.800000011921,"fetchStart":443.6000000089407,"redirectEnd":0,"redirectStart":0,"requestStart":1320.9000000059605,"responseEnd":1336.2000000029802,"responseStart":1333.1000000089407,"secureConnectionStart":1319.800000011921},{"duration":4078.5999999940395,"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":443.80000001192093,"connectEnd":443.80000001192093,"connectStart":443.80000001192093,"domainLookupEnd":443.80000001192093,"domainLookupStart":443.80000001192093,"fetchStart":443.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":443.80000001192093,"responseEnd":4522.4000000059605,"responseStart":4522.4000000059605,"secureConnectionStart":443.80000001192093},{"duration":20,"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":444,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":444,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":464,"responseStart":0,"secureConnectionStart":0},{"duration":893.4000000059605,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/f66960d7757d5f06891021cb34673e32/shortcuts.js?context=issuenavigation&context=issueaction","startTime":444.20000000298023,"connectEnd":444.20000000298023,"connectStart":444.20000000298023,"domainLookupEnd":444.20000000298023,"domainLookupStart":444.20000000298023,"fetchStart":444.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":1321.1000000089407,"responseEnd":1337.6000000089407,"responseStart":1334.5,"secureConnectionStart":444.20000000298023},{"duration":20.599999994039536,"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":444.30000001192093,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":444.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":464.90000000596046,"responseStart":0,"secureConnectionStart":0},{"duration":895.5,"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":444.5,"connectEnd":444.5,"connectStart":444.5,"domainLookupEnd":444.5,"domainLookupStart":444.5,"fetchStart":444.5,"redirectEnd":0,"redirectStart":0,"requestStart":1321.300000011921,"responseEnd":1340,"responseStart":1335.2000000029802,"secureConnectionStart":444.5},{"duration":895.5,"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":448.5,"connectEnd":448.5,"connectStart":448.5,"domainLookupEnd":448.5,"domainLookupStart":448.5,"fetchStart":448.5,"redirectEnd":0,"redirectStart":0,"requestStart":1333,"responseEnd":1344,"responseStart":1343.1000000089407,"secureConnectionStart":448.5},{"duration":891.3999999910593,"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":450.80000001192093,"connectEnd":450.80000001192093,"connectStart":450.80000001192093,"domainLookupEnd":450.80000001192093,"domainLookupStart":450.80000001192093,"fetchStart":450.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":1328.1000000089407,"responseEnd":1342.2000000029802,"responseStart":1340.2000000029802,"secureConnectionStart":450.80000001192093},{"duration":1355.2999999970198,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1597.9000000059605,"connectEnd":1597.9000000059605,"connectStart":1597.9000000059605,"domainLookupEnd":1597.9000000059605,"domainLookupStart":1597.9000000059605,"fetchStart":1597.9000000059605,"redirectEnd":0,"redirectStart":0,"requestStart":2923.9000000059605,"responseEnd":2953.2000000029802,"responseStart":2952.1000000089407,"secureConnectionStart":1597.9000000059605},{"duration":1444.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":2956.300000011921,"connectEnd":2956.300000011921,"connectStart":2956.300000011921,"domainLookupEnd":2956.300000011921,"domainLookupStart":2956.300000011921,"fetchStart":2956.300000011921,"redirectEnd":0,"redirectStart":0,"requestStart":4369.100000008941,"responseEnd":4400.800000011921,"responseStart":4399.9000000059605,"secureConnectionStart":2956.300000011921}],"fetchStart":0,"domainLookupStart":201,"domainLookupEnd":219,"connectStart":219,"connectEnd":244,"secureConnectionStart":228,"requestStart":244,"responseStart":434,"responseEnd":451,"domLoading":437,"domInteractive":4747,"domContentLoadedEventStart":4748,"domContentLoadedEventEnd":4810,"domComplete":5432,"loadEventStart":5432,"loadEventEnd":5432,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":4723.20000000298},{"name":"bigPipe.sidebar-id.end","time":4724},{"name":"bigPipe.activity-panel-pipe-id.start","time":4724.20000000298},{"name":"bigPipe.activity-panel-pipe-id.end","time":4725.800000011921},{"name":"activityTabFullyLoaded","time":4826.800000011921}],"measures":[],"correlationId":"b36e4501e5cdc3","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":108,"dbReadsTimeInMs":15,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Might be related to
MDEV-11138