mysqld: /src/10.2/sql/item_sum.cc:1339: void Item_sum_sum::add_helper(bool): Assertion `count > 0' failed.
|
160521 19:34:51 [ERROR] mysqld got signal 6 ;
|
#7 0x00007f994920c1d2 in __assert_fail () from /lib64/libc.so.6
|
#8 0x000055c4a846f1b0 in Item_sum_sum::add_helper (this=0x7f993f867538, perform_removal=true) at /src/10.2/sql/item_sum.cc:1339
|
#9 0x000055c4a846f7d8 in Item_sum_sum::remove (this=0x7f993f867538) at /src/10.2/sql/item_sum.cc:1426
|
#10 0x000055c4a847041a in Item_sum_avg::remove (this=0x7f993f867538) at /src/10.2/sql/item_sum.cc:1685
|
#11 0x000055c4a831c792 in Frame_range_n_top::walk_till_non_peer (this=0x7f993f86b8b8, item=0x7f993f867538) at /src/10.2/sql/sql_window.cc:915
|
#12 0x000055c4a831c676 in Frame_range_n_top::next_partition (this=0x7f993f86b8b8, rownum=0, item=0x7f993f867538) at /src/10.2/sql/sql_window.cc:884
|
#13 0x000055c4a831add6 in compute_window_func_with_frames (item_win=0x7f993f867cd8, tbl=0x7f993f96d088, info=0x7f994b4d9340) at /src/10.2/sql/sql_window.cc:1729
|
#14 0x000055c4a831b219 in Window_func_runner::exec (this=0x7f993f86adc0, tbl=0x7f993f96d088, filesort_result=0x7f993f701000) at /src/10.2/sql/sql_window.cc:1860
|
#15 0x000055c4a831b305 in Window_funcs_sort::exec (this=0x7f993f86ad98, join=0x7f993f868618) at /src/10.2/sql/sql_window.cc:1887
|
#16 0x000055c4a831b6b6 in Window_funcs_computation::exec (this=0x7f993f86ad78, join=0x7f993f868618) at /src/10.2/sql/sql_window.cc:1969
|
#17 0x000055c4a81ec57c in AGGR_OP::end_send (this=0x7f993f86aa40) at /src/10.2/sql/sql_select.cc:25992
|
#18 0x000055c4a81d8625 in sub_select_postjoin_aggr (join=0x7f993f868618, join_tab=0x7f993f869ca0, end_of_records=true) at /src/10.2/sql/sql_select.cc:17973
|
#19 0x000055c4a81d8913 in sub_select (join=0x7f993f868618, join_tab=0x7f993f8698f8, end_of_records=true) at /src/10.2/sql/sql_select.cc:18209
|
#20 0x000055c4a81d81a5 in do_select (join=0x7f993f868618, procedure=0x0) at /src/10.2/sql/sql_select.cc:17803
|
#21 0x000055c4a81b41e6 in JOIN::exec_inner (this=0x7f993f868618) at /src/10.2/sql/sql_select.cc:3342
|
#22 0x000055c4a81b3766 in JOIN::exec (this=0x7f993f868618) at /src/10.2/sql/sql_select.cc:3154
|
#23 0x000055c4a81b4866 in mysql_select (thd=0x7f993f82dc30, tables=0x7f993f867f20, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f993f8685f8, unit=0x7f993f831680, select_lex=0x7f993f831da8) at /src/10.2/sql/sql_select.cc:3538
|
#24 0x000055c4a81aa0b0 in handle_select (thd=0x7f993f82dc30, lex=0x7f993f8315b8, result=0x7f993f8685f8, setup_tables_done_option=0) at /src/10.2/sql/sql_select.cc:377
|
#25 0x000055c4a8179a47 in execute_sqlcom_select (thd=0x7f993f82dc30, all_tables=0x7f993f867f20) at /src/10.2/sql/sql_parse.cc:6318
|
#26 0x000055c4a816f74c in mysql_execute_command (thd=0x7f993f82dc30) at /src/10.2/sql/sql_parse.cc:3356
|
#27 0x000055c4a817d110 in mysql_parse (thd=0x7f993f82dc30, rawbuf=0x7f993f867188 "select o_custkey, Avg(o_custkey) OVER (PARTITION BY abs(o_custkey) ORDER BY o_custkey RANGE BETWEEN 15 FOLLOWING AND 15 FOLLOWING) from orders", length=142, parser_state=0x7f994b4da9e0, is_com_multi=false, is_next_command=false) at /src/10.2/sql/sql_parse.cc:7730
|
#28 0x000055c4a816b561 in dispatch_command (command=COM_QUERY, thd=0x7f993f82dc30, packet=0x7f993f8611f1 "", packet_length=142, is_com_multi=false, is_next_command=false) at /src/10.2/sql/sql_parse.cc:1794
|
#29 0x000055c4a8169fa0 in do_command (thd=0x7f993f82dc30) at /src/10.2/sql/sql_parse.cc:1355
|
#30 0x000055c4a82a043a in do_handle_one_connection (connect=0x7f9948c84310) at /src/10.2/sql/sql_connect.cc:1358
|
#31 0x000055c4a82a01cc in handle_one_connection (arg=0x7f9948c84310) at /src/10.2/sql/sql_connect.cc:1264
|
#32 0x000055c4a89b55f6 in pfs_spawn_thread (arg=0x7f99441c6ff0) at /src/10.2/storage/perfschema/pfs.cc:1862
|
#33 0x00007f994b1550a4 in start_thread () from /lib64/libpthread.so.0
|
#34 0x00007f99492c304d in clone () from /lib64/libc.so.6
|
CREATE TABLE `orders` (
|
`o_orderkey` int(11) NOT NULL,
|
`o_custkey` int(11) DEFAULT NULL,
|
`o_orderstatus` char(1) DEFAULT NULL,
|
`o_totalprice` double DEFAULT NULL,
|
`o_orderDATE` date DEFAULT NULL,
|
`o_orderpriority` char(15) DEFAULT NULL,
|
`o_clerk` char(15) DEFAULT NULL,
|
`o_shippriority` int(11) DEFAULT NULL,
|
`o_comment` varchar(79) DEFAULT NULL,
|
PRIMARY KEY (`o_orderkey`),
|
KEY `i_o_orderdate` (`o_orderDATE`),
|
KEY `i_o_custkey` (`o_custkey`)
|
) DEFAULT CHARSET=latin1;
|
|
INSERT INTO `orders` VALUES (59908,242,'F',33695.83,'1992-09-26','1-URGENT','Clerk#000000016',0,'furiously pending requests wake sly');
|
INSERT INTO `orders` VALUES (59940,238,'F',130910.25,'1994-09-25','5-LOW','Clerk#000000515',0,'ironic, ironic packages cajole slyly across the regular, bold d');
|
|
select o_custkey, Avg(o_custkey) OVER (PARTITION BY abs(o_custkey) ORDER BY o_custkey RANGE BETWEEN 15 FOLLOWING AND 15 FOLLOWING) from orders;
|
- relates to
-
MDEV-9896
Testing for window functions
-
-
Open
{"report":{"fcp":735.5,"ttfb":202.40000009536743,"pageVisibility":"visible","entityId":56793,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"03d69293-39d3-476a-b25b-5e853ca57fd0","navigationType":0,"readyForUser":815.5999999046326,"redirectCount":0,"resourceLoadedEnd":504.30000019073486,"resourceLoadedStart":207.30000019073486,"resourceTiming":[{"duration":5.799999713897705,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":207.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":207.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":213.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":7.099999904632568,"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":207.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":207.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":214.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":71,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":207.80000019073486,"connectEnd":207.80000019073486,"connectStart":207.80000019073486,"domainLookupEnd":207.80000019073486,"domainLookupStart":207.80000019073486,"fetchStart":207.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":217,"responseEnd":278.80000019073486,"responseStart":234.40000009536743,"secureConnectionStart":207.80000019073486},{"duration":109.7999997138977,"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":207.90000009536743,"connectEnd":207.90000009536743,"connectStart":207.90000009536743,"domainLookupEnd":207.90000009536743,"domainLookupStart":207.90000009536743,"fetchStart":207.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":217.5,"responseEnd":317.69999980926514,"responseStart":238.40000009536743,"secureConnectionStart":207.90000009536743},{"duration":32.30000019073486,"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":208.09999990463257,"connectEnd":208.09999990463257,"connectStart":208.09999990463257,"domainLookupEnd":208.09999990463257,"domainLookupStart":208.09999990463257,"fetchStart":208.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":218.69999980926514,"responseEnd":240.40000009536743,"responseStart":239.59999990463257,"secureConnectionStart":208.09999990463257},{"duration":47.200000286102295,"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":208.19999980926514,"connectEnd":208.19999980926514,"connectStart":208.19999980926514,"domainLookupEnd":208.19999980926514,"domainLookupStart":208.19999980926514,"fetchStart":208.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":220,"responseEnd":255.40000009536743,"responseStart":254.69999980926514,"secureConnectionStart":208.19999980926514},{"duration":46.19999980926514,"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":208.40000009536743,"connectEnd":208.40000009536743,"connectStart":208.40000009536743,"domainLookupEnd":208.40000009536743,"domainLookupStart":208.40000009536743,"fetchStart":208.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":220.90000009536743,"responseEnd":254.59999990463257,"responseStart":253.90000009536743,"secureConnectionStart":208.40000009536743},{"duration":11.900000095367432,"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":208.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":208.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":220.5,"responseStart":0,"secureConnectionStart":0},{"duration":45.10000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":208.69999980926514,"connectEnd":208.69999980926514,"connectStart":208.69999980926514,"domainLookupEnd":208.69999980926514,"domainLookupStart":208.69999980926514,"fetchStart":208.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":223.69999980926514,"responseEnd":253.80000019073486,"responseStart":252.90000009536743,"secureConnectionStart":208.69999980926514},{"duration":13.099999904632568,"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":208.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":208.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":222,"responseStart":0,"secureConnectionStart":0},{"duration":55.30000019073486,"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":209.09999990463257,"connectEnd":209.09999990463257,"connectStart":209.09999990463257,"domainLookupEnd":209.09999990463257,"domainLookupStart":209.09999990463257,"fetchStart":209.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":225,"responseEnd":264.40000009536743,"responseStart":263.59999990463257,"secureConnectionStart":209.09999990463257},{"duration":275.80000019073486,"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":228.5,"connectEnd":228.5,"connectStart":228.5,"domainLookupEnd":228.5,"domainLookupStart":228.5,"fetchStart":228.5,"redirectEnd":0,"redirectStart":0,"requestStart":243.30000019073486,"responseEnd":504.30000019073486,"responseStart":495.09999990463257,"secureConnectionStart":228.5},{"duration":267.90000009536743,"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":228.59999990463257,"connectEnd":228.59999990463257,"connectStart":228.59999990463257,"domainLookupEnd":228.59999990463257,"domainLookupStart":228.59999990463257,"fetchStart":228.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":243.59999990463257,"responseEnd":496.5,"responseStart":494.09999990463257,"secureConnectionStart":228.59999990463257},{"duration":215.40000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":493.09999990463257,"connectEnd":493.09999990463257,"connectStart":493.09999990463257,"domainLookupEnd":493.09999990463257,"domainLookupStart":493.09999990463257,"fetchStart":493.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":671.0999999046326,"responseEnd":708.5,"responseStart":707.9000000953674,"secureConnectionStart":493.09999990463257},{"duration":143.09999990463257,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":712.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":712.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":855.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":146.2999997138977,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":735.3000001907349,"connectEnd":735.3000001907349,"connectStart":735.3000001907349,"domainLookupEnd":735.3000001907349,"domainLookupStart":735.3000001907349,"fetchStart":735.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":849.6999998092651,"responseEnd":881.5999999046326,"responseStart":881,"secureConnectionStart":735.3000001907349}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":38,"responseStart":203,"responseEnd":228,"domLoading":206,"domInteractive":881,"domContentLoadedEventStart":881,"domContentLoadedEventEnd":923,"domComplete":1242,"loadEventStart":1242,"loadEventEnd":1243,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":857.5},{"name":"bigPipe.sidebar-id.end","time":858.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":858.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":860.1999998092651},{"name":"activityTabFullyLoaded","time":944.9000000953674}],"measures":[],"correlationId":"4a42017e7c622a","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":94,"dbReadsTimeInMs":12,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Hi Sergei!
I have a fix for this issue. Please review it here:
https://github.com/MariaDB/server/commit/4d1e032458c7cb591da77ad576a8694fe65dddb6
The reasoning is explained in the commit message. Note that this is on top of my cursors refactoring, so that's why Frame_cursor constructors are slightly different. The logic concerning this bug however applies to the previous version as well.
Thanks,
Vicentiu