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":927.8999998569489,"ttfb":198.59999990463257,"pageVisibility":"visible","entityId":59406,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"73c62e57-8311-4f23-98ab-e84cd2b46dee","navigationType":0,"readyForUser":1003.8999998569489,"redirectCount":0,"resourceLoadedEnd":648.7999999523163,"resourceLoadedStart":209.5,"resourceTiming":[{"duration":22.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":209.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":209.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":232.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":23.90000009536743,"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":209.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":209.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":233.79999995231628,"responseStart":0,"secureConnectionStart":0},{"duration":240.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":210,"connectEnd":210,"connectStart":210,"domainLookupEnd":210,"domainLookupStart":210,"fetchStart":210,"redirectEnd":0,"redirectStart":0,"requestStart":210,"responseEnd":450.59999990463257,"responseStart":450.59999990463257,"secureConnectionStart":210},{"duration":227.20000004768372,"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":210.59999990463257,"connectEnd":210.59999990463257,"connectStart":210.59999990463257,"domainLookupEnd":210.59999990463257,"domainLookupStart":210.59999990463257,"fetchStart":210.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":210.59999990463257,"responseEnd":437.7999999523163,"responseStart":437.7999999523163,"secureConnectionStart":210.59999990463257},{"duration":56.700000047683716,"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":210.79999995231628,"connectEnd":210.79999995231628,"connectStart":210.79999995231628,"domainLookupEnd":210.79999995231628,"domainLookupStart":210.79999995231628,"fetchStart":210.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":210.79999995231628,"responseEnd":267.5,"responseStart":267.5,"secureConnectionStart":210.79999995231628},{"duration":230,"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":211.09999990463257,"connectEnd":211.09999990463257,"connectStart":211.09999990463257,"domainLookupEnd":211.09999990463257,"domainLookupStart":211.09999990463257,"fetchStart":211.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":211.09999990463257,"responseEnd":441.09999990463257,"responseStart":441.09999990463257,"secureConnectionStart":211.09999990463257},{"duration":241.20000004768372,"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":211.19999980926514,"connectEnd":211.19999980926514,"connectStart":211.19999980926514,"domainLookupEnd":211.19999980926514,"domainLookupStart":211.19999980926514,"fetchStart":211.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":211.19999980926514,"responseEnd":452.39999985694885,"responseStart":452.39999985694885,"secureConnectionStart":211.19999980926514},{"duration":242.20000004768372,"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":211.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":211.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":453.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":241.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":211.5,"connectEnd":211.5,"connectStart":211.5,"domainLookupEnd":211.5,"domainLookupStart":211.5,"fetchStart":211.5,"redirectEnd":0,"redirectStart":0,"requestStart":211.5,"responseEnd":453,"responseStart":453,"secureConnectionStart":211.5},{"duration":242,"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":211.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":211.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":453.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":241.79999995231628,"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":211.79999995231628,"connectEnd":211.79999995231628,"connectStart":211.79999995231628,"domainLookupEnd":211.79999995231628,"domainLookupStart":211.79999995231628,"fetchStart":211.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":211.79999995231628,"responseEnd":453.59999990463257,"responseStart":453.59999990463257,"secureConnectionStart":211.79999995231628},{"duration":337.09999990463257,"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":220.5,"connectEnd":220.5,"connectStart":220.5,"domainLookupEnd":220.5,"domainLookupStart":220.5,"fetchStart":220.5,"redirectEnd":0,"redirectStart":0,"requestStart":220.5,"responseEnd":557.5999999046326,"responseStart":557.5999999046326,"secureConnectionStart":220.5},{"duration":428.10000014305115,"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":220.69999980926514,"connectEnd":220.69999980926514,"connectStart":220.69999980926514,"domainLookupEnd":220.69999980926514,"domainLookupStart":220.69999980926514,"fetchStart":220.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":220.69999980926514,"responseEnd":648.7999999523163,"responseStart":648.7999999523163,"secureConnectionStart":220.69999980926514},{"duration":245.80000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":686.6999998092651,"connectEnd":686.6999998092651,"connectStart":686.6999998092651,"domainLookupEnd":686.6999998092651,"domainLookupStart":686.6999998092651,"fetchStart":686.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":686.6999998092651,"responseEnd":932.5,"responseStart":932.5,"secureConnectionStart":686.6999998092651},{"duration":216,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":905,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":905,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1121,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":32,"responseStart":198,"responseEnd":220,"domLoading":202,"domInteractive":1070,"domContentLoadedEventStart":1070,"domContentLoadedEventEnd":1116,"domComplete":1666,"loadEventStart":1666,"loadEventEnd":1668,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1047.7999999523163},{"name":"bigPipe.sidebar-id.end","time":1048.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1048.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":1051.1999998092651},{"name":"activityTabFullyLoaded","time":1126}],"measures":[],"correlationId":"4e534606d09145","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":96,"dbReadsTimeInMs":11,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}