Looks like one missed codepath in MDEV-21915 bugfix.
USE test;
|
CREATE TABLE t(a INT,b INT) ENGINE=MEMORY;
|
INSERT INTO t SET a=1;
|
SELECT JSON_ARRAYAGG(b LIMIT 2) FROM t;
|
Leads to:
10.5.4 69077dea25f6e7cab4ff8927e4429ad62af9de49
|
Core was generated by `/test/MD160520-mariadb-10.5.4-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
|
Program terminated with signal SIGSEGV, Segmentation fault.
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
|
at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
|
[Current thread is 1 (Thread 0x15365ef9d700 (LWP 1642790))]
|
(gdb) bt
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
|
#1 0x00005566c59b6617 in my_write_core (sig=sig@entry=11) at /test/10.5_opt/mysys/stacktrace.c:518
|
#2 0x00005566c53790fa in handle_fatal_signal (sig=11) at /test/10.5_opt/sql/signal_handler.cc:329
|
#3 <signal handler called>
|
#4 0x00005566c543bbc4 in Item_func_group_concat::add (this=0x15363c047780, exclude_nulls=false) at /test/10.5_opt/sql/item_sum.cc:3999
|
#5 0x00005566c51ac148 in Item_sum::aggregator_add (this=0x15363c047780) at /test/10.5_opt/sql/item_sum.h:560
|
#6 Item_sum::reset_and_add (this=0x15363c047780) at /test/10.5_opt/sql/item_sum.h:445
|
#7 init_sum_functions (func_ptr=0x15363c049320, end_ptr=0x15363c049328) at /test/10.5_opt/sql/sql_select.cc:25660
|
#8 0x00005566c51d4c6c in end_send_group (join=0x15363c048c70, join_tab=<optimized out>, end_of_records=<optimized out>) at /test/10.5_opt/sql/sql_select.cc:22016
|
#9 0x00005566c51e1bf0 in do_select (procedure=<optimized out>, join=0x15363c048c70) at /test/10.5_opt/sql/sql_select.cc:20105
|
#10 JOIN::exec_inner (this=this@entry=0x15363c048c70) at /test/10.5_opt/sql/sql_select.cc:4464
|
#11 0x00005566c51e1e67 in JOIN::exec (this=this@entry=0x15363c048c70) at /test/10.5_opt/sql/sql_select.cc:4245
|
#12 0x00005566c51e01b2 in mysql_select (thd=thd@entry=0x15363c012018, tables=0x15363c047c68, fields=..., conds=0x0, og_num=<optimized out>, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x15363c048c48, unit=0x15363c015e68, select_lex=0x15363c0470e0) at /test/10.5_opt/sql/sql_select.cc:4669
|
#13 0x00005566c51e0b71 in handle_select (thd=thd@entry=0x15363c012018, lex=lex@entry=0x15363c015da0, result=result@entry=0x15363c048c48, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.5_opt/sql/sql_select.cc:417
|
#14 0x00005566c5187781 in execute_sqlcom_select (thd=thd@entry=0x15363c012018, all_tables=0x15363c047c68) at /test/10.5_opt/sql/sql_parse.cc:6172
|
#15 0x00005566c51836a2 in mysql_execute_command (thd=thd@entry=0x15363c012018) at /test/10.5_opt/sql/sql_parse.cc:3901
|
#16 0x00005566c518a82c in mysql_parse (thd=0x15363c012018, rawbuf=<optimized out>, length=38, parser_state=0x15365ef9c4b0, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_parse.cc:7957
|
#17 0x00005566c517fe75 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x15363c012018, packet=packet@entry=0x15363c03a019 "", packet_length=packet_length@entry=38, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_opt/sql/sql_parse.cc:1839
|
#18 0x00005566c517e106 in do_command (thd=0x15363c012018) at /test/10.5_opt/sql/sql_parse.cc:1358
|
#19 0x00005566c5272bf1 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x15365cc329b8, put_in_cache=put_in_cache@entry=true) at /test/10.5_opt/sql/sql_connect.cc:1411
|
#20 0x00005566c5272f54 in handle_one_connection (arg=arg@entry=0x15365cc329b8) at /test/10.5_opt/sql/sql_connect.cc:1313
|
#21 0x00005566c55de43a in pfs_spawn_thread (arg=0x15365cc4b018) at /test/10.5_opt/storage/perfschema/pfs.cc:2201
|
#22 0x000015365e3c46db in start_thread (arg=0x15365ef9d700) at pthread_create.c:463
|
#23 0x000015365d7c288f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.5.2 (dbg), 10.5.2 (opt), 10.5.3 (dbg), 10.5.3 (opt), 10.5.4 (dbg), 10.5.4 (opt)
Bug confirmed not present in:
MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (dbg), 10.3.23 (opt), 10.4.13 (dbg), 10.4.13 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)
{"report":{"fcp":999.5,"ttfb":194.70000004768372,"pageVisibility":"visible","entityId":87180,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"6dde88d6-0454-47da-82c7-4ac0ebabf89a","navigationType":0,"readyForUser":1062.2999999523163,"redirectCount":0,"resourceLoadedEnd":731.9000000953674,"resourceLoadedStart":199.90000009536743,"resourceTiming":[{"duration":321.7999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":199.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":199.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":521.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":321.59999990463257,"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":200.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":200.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":521.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":330.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":200.29999995231628,"connectEnd":200.29999995231628,"connectStart":200.29999995231628,"domainLookupEnd":200.29999995231628,"domainLookupStart":200.29999995231628,"fetchStart":200.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":200.29999995231628,"responseEnd":531.2000000476837,"responseStart":531.2000000476837,"secureConnectionStart":200.29999995231628},{"duration":378.5,"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":200.40000009536743,"connectEnd":200.40000009536743,"connectStart":200.40000009536743,"domainLookupEnd":200.40000009536743,"domainLookupStart":200.40000009536743,"fetchStart":200.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":200.40000009536743,"responseEnd":578.9000000953674,"responseStart":578.9000000953674,"secureConnectionStart":200.40000009536743},{"duration":382.2000000476837,"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":200.5,"connectEnd":200.5,"connectStart":200.5,"domainLookupEnd":200.5,"domainLookupStart":200.5,"fetchStart":200.5,"redirectEnd":0,"redirectStart":0,"requestStart":200.5,"responseEnd":582.7000000476837,"responseStart":582.7000000476837,"secureConnectionStart":200.5},{"duration":382.5,"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":200.60000014305115,"connectEnd":200.60000014305115,"connectStart":200.60000014305115,"domainLookupEnd":200.60000014305115,"domainLookupStart":200.60000014305115,"fetchStart":200.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":200.60000014305115,"responseEnd":583.1000001430511,"responseStart":583.1000001430511,"secureConnectionStart":200.60000014305115},{"duration":383,"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":200.60000014305115,"connectEnd":200.60000014305115,"connectStart":200.60000014305115,"domainLookupEnd":200.60000014305115,"domainLookupStart":200.60000014305115,"fetchStart":200.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":200.60000014305115,"responseEnd":583.6000001430511,"responseStart":583.6000001430511,"secureConnectionStart":200.60000014305115},{"duration":383.30000019073486,"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":200.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":200.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":584.1000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":383.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":200.90000009536743,"connectEnd":200.90000009536743,"connectStart":200.90000009536743,"domainLookupEnd":200.90000009536743,"domainLookupStart":200.90000009536743,"fetchStart":200.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":200.90000009536743,"responseEnd":584.1000001430511,"responseStart":584.1000001430511,"secureConnectionStart":200.90000009536743},{"duration":383.5,"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":201,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":201,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":584.5,"responseStart":0,"secureConnectionStart":0},{"duration":383.40000009536743,"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":201.20000004768372,"connectEnd":201.20000004768372,"connectStart":201.20000004768372,"domainLookupEnd":201.20000004768372,"domainLookupStart":201.20000004768372,"fetchStart":201.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":201.20000004768372,"responseEnd":584.6000001430511,"responseStart":584.6000001430511,"secureConnectionStart":201.20000004768372},{"duration":489.90000009536743,"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":206.70000004768372,"connectEnd":206.70000004768372,"connectStart":206.70000004768372,"domainLookupEnd":206.70000004768372,"domainLookupStart":206.70000004768372,"fetchStart":206.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":206.70000004768372,"responseEnd":696.6000001430511,"responseStart":696.5,"secureConnectionStart":206.70000004768372},{"duration":524.7999999523163,"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":207.10000014305115,"connectEnd":207.10000014305115,"connectStart":207.10000014305115,"domainLookupEnd":207.10000014305115,"domainLookupStart":207.10000014305115,"fetchStart":207.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":207.10000014305115,"responseEnd":731.9000000953674,"responseStart":731.9000000953674,"secureConnectionStart":207.10000014305115},{"duration":236.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":767,"connectEnd":767,"connectStart":767,"domainLookupEnd":767,"domainLookupStart":767,"fetchStart":767,"redirectEnd":0,"redirectStart":0,"requestStart":767,"responseEnd":1003.9000000953674,"responseStart":1003.9000000953674,"secureConnectionStart":767}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":53,"responseStart":195,"responseEnd":207,"domLoading":198,"domInteractive":1123,"domContentLoadedEventStart":1124,"domContentLoadedEventEnd":1165,"domComplete":1875,"loadEventStart":1875,"loadEventEnd":1877,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1104.2999999523163},{"name":"bigPipe.sidebar-id.end","time":1105},{"name":"bigPipe.activity-panel-pipe-id.start","time":1105.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":1107.7000000476837},{"name":"activityTabFullyLoaded","time":1173.5}],"measures":[],"correlationId":"5a7bc5aeb8d41e","effectiveType":"4g","downlink":9.4,"rtt":0,"serverDuration":79,"dbReadsTimeInMs":13,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}