Type:
Bug
Priority:
Blocker
Resolution:
Fixed
Affects Version/s:
10.4(EOL) , 10.5 , 10.6 , 10.7(EOL) , 10.8(EOL) , 10.9(EOL) , 10.10(EOL) , 10.11 , 11.0(EOL)
Note: The query in the test case doesn't look meaningful, but I'm not sure the problem is limited to such nonsensical queries. If the analysis shows that it indeed does, I don't object demoting it from a blocker.
CREATE TABLE t (f INT );
INSERT INTO t VALUES (1),(2);
SELECT DISTINCT CONVERT (STDDEV(f), CHAR (16)) AS f1, UUID() AS f2 FROM t GROUP BY f2 WITH ROLLUP ;
# Cleanup
DROP TABLE t;
10.4 2e1c532b
#3 <signal handler called>
#4 0x0000559fad00b719 in store_length (to=0x7f74ae61d3f9 <error: Cannot access memory at address 0x7f74ae61d3f9>, length=6, pack_length=2779096485) at /data/src/10.4/sql/filesort.cc:970
#5 0x0000559fad00ba35 in Type_handler_string_result::make_sort_key (this=0x559fae437f10 <type_handler_varchar>, to=0x7f745407798e '\245' <repeats 200 times>..., item=0x7f7454015018, sort_field=0x7f7454155fa0, tmp_buffer=0x7f7464b72e60) at /data/src/10.4/sql/filesort.cc:1037
#6 0x0000559facd47ea9 in make_sort_key (sortorder=0x7f7454155fa0, key_buffer=0x7f745407798d "\001", '\245' <repeats 199 times>..., tmp_value=0x7f7464b72e60) at /data/src/10.4/sql/sql_select.cc:24322
#7 0x0000559facd488bc in remove_dup_with_hash_index (thd=0x7f7454000da0, table=0x7f74540537d8, field_count=1, first_field=0x7f7454054b58, sortorder=0x7f7454155fa0, key_length=126, having=0x0) at /data/src/10.4/sql/sql_select.cc:24534
#8 0x0000559facd47d30 in st_join_table::remove_duplicates (this=0x7f74540180f8) at /data/src/10.4/sql/sql_select.cc:24296
#9 0x0000559facd40fb2 in join_init_read_record (tab=0x7f74540180f8) at /data/src/10.4/sql/sql_select.cc:21753
#10 0x0000559facd578ed in AGGR_OP::end_send (this=0x7f7454019210) at /data/src/10.4/sql/sql_select.cc:29577
#11 0x0000559facd3e731 in sub_select_postjoin_aggr (join=0x7f7454016420, join_tab=0x7f74540180f8, end_of_records=true) at /data/src/10.4/sql/sql_select.cc:20544
#12 0x0000559facd3eaaf in sub_select (join=0x7f7454016420, join_tab=0x7f7454017d50, end_of_records=true) at /data/src/10.4/sql/sql_select.cc:20779
#13 0x0000559facd3e751 in sub_select_postjoin_aggr (join=0x7f7454016420, join_tab=0x7f7454017d50, end_of_records=true) at /data/src/10.4/sql/sql_select.cc:20546
#14 0x0000559facd3eaaf in sub_select (join=0x7f7454016420, join_tab=0x7f74540179a8, end_of_records=true) at /data/src/10.4/sql/sql_select.cc:20779
#15 0x0000559facd3e16a in do_select (join=0x7f7454016420, procedure=0x0) at /data/src/10.4/sql/sql_select.cc:20368
#16 0x0000559facd1173c in JOIN::exec_inner (this=0x7f7454016420) at /data/src/10.4/sql/sql_select.cc:4590
#17 0x0000559facd10810 in JOIN::exec (this=0x7f7454016420) at /data/src/10.4/sql/sql_select.cc:4372
#18 0x0000559facd1200f in mysql_select (thd=0x7f7454000da0, tables=0x7f7454015260, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0, group=0x7f7454015a80, having=0x0, proc_param=0x0, select_options=2147748609, result=0x7f74540163f8, unit=0x7f7454004cd8, select_lex=0x7f7454014900) at /data/src/10.4/sql/sql_select.cc:4811
#19 0x0000559facd00ddf in handle_select (thd=0x7f7454000da0, lex=0x7f7454004c18, result=0x7f74540163f8, setup_tables_done_option=0) at /data/src/10.4/sql/sql_select.cc:442
#20 0x0000559faccc3c0e in execute_sqlcom_select (thd=0x7f7454000da0, all_tables=0x7f7454015260) at /data/src/10.4/sql/sql_parse.cc:6463
#21 0x0000559faccba110 in mysql_execute_command (thd=0x7f7454000da0) at /data/src/10.4/sql/sql_parse.cc:3966
#22 0x0000559faccc7d83 in mysql_parse (thd=0x7f7454000da0, rawbuf=0x7f74540147e8 "SELECT DISTINCT CONVERT(STDDEV(f), CHAR(16)) AS f1, UUID() AS f2 FROM t GROUP BY f2 WITH ROLLUP", length=95, parser_state=0x7f7464b743c0, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7998
#23 0x0000559faccb37b5 in dispatch_command (command=COM_QUERY, thd=0x7f7454000da0, packet=0x7f745400ac41 "", packet_length=95, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
#24 0x0000559faccb201c in do_command (thd=0x7f7454000da0) at /data/src/10.4/sql/sql_parse.cc:1378
#25 0x0000559face529ca in do_handle_one_connection (connect=0x559fb0eefa00) at /data/src/10.4/sql/sql_connect.cc:1420
#26 0x0000559face52732 in handle_one_connection (arg=0x559fb0eefa00) at /data/src/10.4/sql/sql_connect.cc:1324
#27 0x0000559fad3a2a48 in pfs_spawn_thread (arg=0x559fb0f35930) at /data/src/10.4/storage/perfschema/pfs.cc:1869
#28 0x00007f746abc8fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#29 0x00007f746ac495bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
The failure started happening on 10.4+ after this commit:
commit 476b24d084e7e717310155bb986eb086d3c1e1a6
Author: Monty
Date: Thu Feb 16 14:19:33 2023 +0200
MDEV-20057 Distinct SUM on CROSS JOIN and grouped returns wrong result
Sergei Petrunia
made changes -
2023-04-24 16:08
Field
Original Value
New Value
Status
Open
[ 1
]
In Progress
[ 3
]
Sergei Petrunia
made changes -
2023-04-24 20:25
Assignee
Sergei Petrunia
[ psergey
]
Oleg Smirnov
[ JIRAUSER50405
]
Oleg Smirnov
made changes -
2023-04-25 07:53
Assignee
Oleg Smirnov
[ JIRAUSER50405
]
Sergei Petrunia
[ psergey
]
Status
In Progress
[ 3
]
In Review
[ 10002
]
Sergei Petrunia
made changes -
2023-04-25 13:00
Assignee
Sergei Petrunia
[ psergey
]
Oleg Smirnov
[ JIRAUSER50405
]
Status
In Review
[ 10002
]
Stalled
[ 10000
]
Oleg Smirnov
made changes -
2023-04-25 15:28
Status
Stalled
[ 10000
]
In Progress
[ 3
]
Oleg Smirnov
made changes -
2023-04-25 15:29
Assignee
Oleg Smirnov
[ JIRAUSER50405
]
Sergei Petrunia
[ psergey
]
Status
In Progress
[ 3
]
In Review
[ 10002
]
Sergei Petrunia
made changes -
2023-04-26 19:05
Assignee
Sergei Petrunia
[ psergey
]
Oleg Smirnov
[ JIRAUSER50405
]
Status
In Review
[ 10002
]
Stalled
[ 10000
]
Julien Fritsch
made changes -
2023-04-27 14:46
Fix Version/s
10.8
[ 26121
]
Oleg Smirnov
made changes -
2023-04-28 03:50
Fix Version/s
10.4.29
[ 28510
]
Fix Version/s
10.5.20
[ 28512
]
Fix Version/s
10.6.13
[ 28514
]
Fix Version/s
10.9.6
[ 28520
]
Fix Version/s
10.10.4
[ 28522
]
Fix Version/s
10.11.3
[ 28524
]
Fix Version/s
11.1.1
[ 28704
]
Fix Version/s
10.8.8
[ 28518
]
Fix Version/s
11.0.2
[ 28706
]
Fix Version/s
10.4
[ 22408
]
Fix Version/s
10.5
[ 23123
]
Fix Version/s
10.6
[ 24028
]
Fix Version/s
10.9
[ 26905
]
Fix Version/s
10.10
[ 27530
]
Fix Version/s
10.11
[ 27614
]
Fix Version/s
11.0
[ 28320
]
Resolution
Fixed
[ 1
]
Status
Stalled
[ 10000
]
Closed
[ 6
]
{"report":{"fcp":1331.8999998569489,"ttfb":328.7000000476837,"pageVisibility":"visible","entityId":121311,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"c087ac0a-62e4-427b-859f-e049b5ba10dd","navigationType":0,"readyForUser":1419.8999998569489,"redirectCount":0,"resourceLoadedEnd":1453,"resourceLoadedStart":334.2000000476837,"resourceTiming":[{"duration":514.0999999046326,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":334.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":334.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":848.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":514.8000001907349,"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":334.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":334.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":849.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":523.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":334.59999990463257,"connectEnd":334.59999990463257,"connectStart":334.59999990463257,"domainLookupEnd":334.59999990463257,"domainLookupStart":334.59999990463257,"fetchStart":334.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":334.59999990463257,"responseEnd":858,"responseStart":858,"secureConnectionStart":334.59999990463257},{"duration":560.9000000953674,"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":334.7999999523163,"connectEnd":334.7999999523163,"connectStart":334.7999999523163,"domainLookupEnd":334.7999999523163,"domainLookupStart":334.7999999523163,"fetchStart":334.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":334.7999999523163,"responseEnd":895.7000000476837,"responseStart":895.7000000476837,"secureConnectionStart":334.7999999523163},{"duration":564.7999999523163,"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":335,"connectEnd":335,"connectStart":335,"domainLookupEnd":335,"domainLookupStart":335,"fetchStart":335,"redirectEnd":0,"redirectStart":0,"requestStart":335,"responseEnd":899.7999999523163,"responseStart":899.7999999523163,"secureConnectionStart":335},{"duration":565.0999999046326,"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":335.2000000476837,"connectEnd":335.2000000476837,"connectStart":335.2000000476837,"domainLookupEnd":335.2000000476837,"domainLookupStart":335.2000000476837,"fetchStart":335.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":335.2000000476837,"responseEnd":900.2999999523163,"responseStart":900.2999999523163,"secureConnectionStart":335.2000000476837},{"duration":565.3000001907349,"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":335.39999985694885,"connectEnd":335.39999985694885,"connectStart":335.39999985694885,"domainLookupEnd":335.39999985694885,"domainLookupStart":335.39999985694885,"fetchStart":335.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":335.39999985694885,"responseEnd":900.7000000476837,"responseStart":900.7000000476837,"secureConnectionStart":335.39999985694885},{"duration":669.7999999523163,"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":335.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":335.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1005.3999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":565.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":335.7999999523163,"connectEnd":335.7999999523163,"connectStart":335.7999999523163,"domainLookupEnd":335.7999999523163,"domainLookupStart":335.7999999523163,"fetchStart":335.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":335.7999999523163,"responseEnd":901.2000000476837,"responseStart":901.2000000476837,"secureConnectionStart":335.7999999523163},{"duration":669.8999998569489,"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":336,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":336,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1005.8999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":565.7000000476837,"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":336,"connectEnd":336,"connectStart":336,"domainLookupEnd":336,"domainLookupStart":336,"fetchStart":336,"redirectEnd":0,"redirectStart":0,"requestStart":336,"responseEnd":901.7000000476837,"responseStart":901.7000000476837,"secureConnectionStart":336},{"duration":718.1999998092651,"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":342.2000000476837,"connectEnd":342.2000000476837,"connectStart":342.2000000476837,"domainLookupEnd":342.2000000476837,"domainLookupStart":342.2000000476837,"fetchStart":342.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":342.2000000476837,"responseEnd":1060.3999998569489,"responseStart":1060.3999998569489,"secureConnectionStart":342.2000000476837},{"duration":832.6000001430511,"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":342.39999985694885,"connectEnd":342.39999985694885,"connectStart":342.39999985694885,"domainLookupEnd":342.39999985694885,"domainLookupStart":342.39999985694885,"fetchStart":342.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":342.39999985694885,"responseEnd":1175,"responseStart":1175,"secureConnectionStart":342.39999985694885},{"duration":133.20000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1038,"connectEnd":1038,"connectStart":1038,"domainLookupEnd":1038,"domainLookupStart":1038,"fetchStart":1038,"redirectEnd":0,"redirectStart":0,"requestStart":1038,"responseEnd":1171.2000000476837,"responseStart":1171.0999999046326,"secureConnectionStart":1038},{"duration":168.10000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1284.8999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1284.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1453,"responseStart":0,"secureConnectionStart":0},{"duration":97.89999985694885,"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":1285.7000000476837,"connectEnd":1285.7000000476837,"connectStart":1285.7000000476837,"domainLookupEnd":1285.7000000476837,"domainLookupStart":1285.7000000476837,"fetchStart":1285.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1285.7000000476837,"responseEnd":1383.5999999046326,"responseStart":1383.5999999046326,"secureConnectionStart":1285.7000000476837},{"duration":142.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":1286.0999999046326,"connectEnd":1286.0999999046326,"connectStart":1286.0999999046326,"domainLookupEnd":1286.0999999046326,"domainLookupStart":1286.0999999046326,"fetchStart":1286.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1286.0999999046326,"responseEnd":1428.2999999523163,"responseStart":1428.2999999523163,"secureConnectionStart":1286.0999999046326},{"duration":176,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1325.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1325.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1501.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":113,"responseStart":328,"responseEnd":337,"domLoading":332,"domInteractive":1549,"domContentLoadedEventStart":1549,"domContentLoadedEventEnd":1612,"domComplete":1780,"loadEventStart":1780,"loadEventEnd":1781,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1503.8999998569489},{"name":"bigPipe.sidebar-id.end","time":1504.7999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":1504.8999998569489},{"name":"bigPipe.activity-panel-pipe-id.end","time":1509.2999999523163},{"name":"activityTabFullyLoaded","time":1632.2000000476837}],"measures":[],"correlationId":"560e15b9fd55af","effectiveType":"4g","downlink":9.2,"rtt":0,"serverDuration":149,"dbReadsTimeInMs":24,"dbConnsTimeInMs":35,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}