Run these queries in release build:
CREATE TABLE t0 ( c6 INT , c21 INT ) ;
INSERT INTO t0 VALUES ( 55 , -95 ) , ( 9 , 90 ) ;
ALTER TABLE t0 ADD COLUMN c37 INT AFTER c6 ;
INSERT INTO t0 VALUES ( ) , ( ) ;
SELECT t0 . c6 AS c42 FROM ( SELECT t0 . c6 = TRIM( TRAILING FROM 96 ) SOUNDS LIKE CONVERT ( t0 . c6 , UNSIGNED ) >> PI ( ) AS c49 FROM t0 ) AS t1 JOIN t0 ON RTRIM ( - RAND ( -66 ) BETWEEN FIND_IN_SET ( 20 , UNHEX ( -80 ) IS NULL OR IF ( 85 , -83 , -113 ) ) AND -125 ) / EXP ( c21 ) = t1 . c49 ORDER BY c42 , ( c42 + ( SELECT c21 AS c61 FROM t0 WHERE t0 . c37 >= -19.601384 = RAND ( ) / TRIM( t0 . c21 FROM 'C@rG3D(#9*17(a.,rV' ) = -106 GROUP BY c21 , c42 HAVING c42 = -73 LIMIT 1 ) ) ;
Will trigger Segmentation fault.
GDB info:
Thread 16 "mariadbd" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd242e300 (LWP 2691)]
0x0000000000c24454 in update_depend_map_for_order (join=0x6290000b23e0, order=0x6290000ae168) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:16583
16583 order->depend_map|=(*tab)->ref.depend_map;
(gdb) p *tab
$10 = (JOIN_TAB *) 0x0
#0 0x0000000000c24454 in update_depend_map_for_order (join=0x6290000b7480, order=0x6290000b46c0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:16583
#1 remove_const (join=<optimized out>, first_order=<optimized out>, cond=<optimized out>, change_list=<optimized out>, simple_order=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:16696
#2 0x0000000000c05386 in JOIN::optimize_stage2 (this=0x6290000b7480) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:3104
#3 0x0000000000c13911 in JOIN::optimize_inner (this=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:2650
#4 0x0000000000bfc156 in JOIN::optimize (this=0x6290000b7480) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:1944
#5 0x0000000000ab5421 in st_select_lex::optimize_unflattened_subqueries (this=<optimized out>, const_only=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_lex.cc:4916
#6 0x0000000000c0856c in JOIN::optimize_stage2 (this=0x6290000b58b0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:3229
#7 0x0000000000c13911 in JOIN::optimize_inner (this=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:2650
#8 0x0000000000bfc156 in JOIN::optimize (this=this@entry=0x6290000b58b0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:1944
#9 0x0000000000be4fdf in mysql_select (thd=<optimized out>, thd@entry=0x62b00016c218, tables=<optimized out>, fields=..., conds=<optimized out>, og_num=<optimized out>, order=<optimized out>, group=0x0, having=0x0, proc_param=0x0, select_options=<optimized out>, result=0x6290000b5880, unit=0x62b0001704a8, select_lex=0x629000091670) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:5235
#10 0x0000000000be4596 in handle_select (thd=thd@entry=0x62b00016c218, lex=<optimized out>, lex@entry=0x62b0001703c8, result=<optimized out>, result@entry=0x6290000b5880, setup_tables_done_option=<optimized out>, setup_tables_done_option@entry=0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:628
#11 0x0000000000b3df18 in execute_sqlcom_select (thd=0x62b00016c218, all_tables=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:6013
#12 0x0000000000b2cd51 in mysql_execute_command (thd=0x62b00016c218, is_called_from_prepared_stmt=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:3912
#13 0x0000000000b1fe79 in mysql_parse (thd=thd@entry=0x62b00016c218, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, parser_state@entry=0x7fffd242ca80) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:7734
#14 0x0000000000b19069 in dispatch_command (command=<optimized out>, thd=0x62b00016c218, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:1893
#15 0x0000000000b20b71 in do_command (thd=0x62b00016c218, blocking=true) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:1406
#16 0x0000000000f03476 in do_handle_one_connection (connect=<optimized out>, put_in_cache=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_connect.cc:1445
#17 0x0000000000f02eb9 in handle_one_connection (arg=arg@entry=0x6080015148b8) at /home/wx/mariadb-11.3.0/sql/sql_connect.cc:1347
#18 0x0000000001a00c1b in pfs_spawn_thread (arg=0x617000006618) at /home/wx/mariadb-11.3.0/storage/perfschema/pfs.cc:2201
#19 0x00007ffff79f7609 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#20 0x00007ffff770f133 in clone () from /lib/x86_64-linux-gnu/libc.so.6
{"report":{"fcp":1068.6999999284744,"ttfb":468.7999999523163,"pageVisibility":"visible","entityId":125649,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"c4d521b8-82d6-4ab3-85a9-ef357657b3a6","navigationType":0,"readyForUser":1141,"redirectCount":0,"resourceLoadedEnd":1277.3999999761581,"resourceLoadedStart":475.60000002384186,"resourceTiming":[{"duration":120.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":475.60000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":475.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":596.1000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":120.60000002384186,"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":475.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":475.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":596.5,"responseStart":0,"secureConnectionStart":0},{"duration":134.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":476.10000002384186,"connectEnd":476.10000002384186,"connectStart":476.10000002384186,"domainLookupEnd":476.10000002384186,"domainLookupStart":476.10000002384186,"fetchStart":476.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":476.10000002384186,"responseEnd":610.3999999761581,"responseStart":610.3999999761581,"secureConnectionStart":476.10000002384186},{"duration":193.39999997615814,"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":476.2999999523163,"connectEnd":476.2999999523163,"connectStart":476.2999999523163,"domainLookupEnd":476.2999999523163,"domainLookupStart":476.2999999523163,"fetchStart":476.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":476.2999999523163,"responseEnd":669.6999999284744,"responseStart":669.6999999284744,"secureConnectionStart":476.2999999523163},{"duration":196.69999992847443,"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":476.60000002384186,"connectEnd":476.60000002384186,"connectStart":476.60000002384186,"domainLookupEnd":476.60000002384186,"domainLookupStart":476.60000002384186,"fetchStart":476.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":476.60000002384186,"responseEnd":673.2999999523163,"responseStart":673.2999999523163,"secureConnectionStart":476.60000002384186},{"duration":197.10000002384186,"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":476.6999999284744,"connectEnd":476.6999999284744,"connectStart":476.6999999284744,"domainLookupEnd":476.6999999284744,"domainLookupStart":476.6999999284744,"fetchStart":476.6999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":476.6999999284744,"responseEnd":673.7999999523163,"responseStart":673.7999999523163,"secureConnectionStart":476.6999999284744},{"duration":197.10000002384186,"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":476.89999997615814,"connectEnd":476.89999997615814,"connectStart":476.89999997615814,"domainLookupEnd":476.89999997615814,"domainLookupStart":476.89999997615814,"fetchStart":476.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":476.89999997615814,"responseEnd":674,"responseStart":674,"secureConnectionStart":476.89999997615814},{"duration":274.60000002384186,"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":477.1999999284744,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":477.1999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":751.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":197.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":477.2999999523163,"connectEnd":477.2999999523163,"connectStart":477.2999999523163,"domainLookupEnd":477.2999999523163,"domainLookupStart":477.2999999523163,"fetchStart":477.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":477.2999999523163,"responseEnd":674.5,"responseStart":674.5,"secureConnectionStart":477.2999999523163},{"duration":274.39999997615814,"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":477.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":477.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":751.8999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":197.5,"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":477.60000002384186,"connectEnd":477.60000002384186,"connectStart":477.60000002384186,"domainLookupEnd":477.60000002384186,"domainLookupStart":477.60000002384186,"fetchStart":477.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":477.60000002384186,"responseEnd":675.1000000238419,"responseStart":675.1000000238419,"secureConnectionStart":477.60000002384186},{"duration":791.5999999046326,"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":478.60000002384186,"connectEnd":478.60000002384186,"connectStart":478.60000002384186,"domainLookupEnd":478.60000002384186,"domainLookupStart":478.60000002384186,"fetchStart":478.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":478.60000002384186,"responseEnd":1270.1999999284744,"responseStart":1270.1999999284744,"secureConnectionStart":478.60000002384186},{"duration":794,"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":478.6999999284744,"connectEnd":478.6999999284744,"connectStart":478.6999999284744,"domainLookupEnd":478.6999999284744,"domainLookupStart":478.6999999284744,"fetchStart":478.6999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":478.6999999284744,"responseEnd":1272.6999999284744,"responseStart":1272.6999999284744,"secureConnectionStart":478.6999999284744},{"duration":156,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":779,"connectEnd":779,"connectStart":779,"domainLookupEnd":779,"domainLookupStart":779,"fetchStart":779,"redirectEnd":0,"redirectStart":0,"requestStart":779,"responseEnd":935,"responseStart":935,"secureConnectionStart":779},{"duration":253,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/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","startTime":1024.3999999761581,"connectEnd":1024.3999999761581,"connectStart":1024.3999999761581,"domainLookupEnd":1024.3999999761581,"domainLookupStart":1024.3999999761581,"fetchStart":1024.3999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":1024.3999999761581,"responseEnd":1277.3999999761581,"responseStart":1277.3999999761581,"secureConnectionStart":1024.3999999761581},{"duration":332.40000009536743,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1062.1999999284744,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1062.1999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1394.6000000238419,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":268,"responseStart":469,"responseEnd":473,"domLoading":472,"domInteractive":1338,"domContentLoadedEventStart":1338,"domContentLoadedEventEnd":1392,"domComplete":1616,"loadEventStart":1617,"loadEventEnd":1617,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1290},{"name":"bigPipe.sidebar-id.end","time":1290.8999999761581},{"name":"bigPipe.activity-panel-pipe-id.start","time":1291},{"name":"bigPipe.activity-panel-pipe-id.end","time":1296.5},{"name":"activityTabFullyLoaded","time":1417.3999999761581}],"measures":[],"correlationId":"bd3b9384bdee09","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":145,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thanks! THis is the same as
MDEV-29681231012 17:58:00 [ERROR] mysqld got signal 11 ;
Server version: 10.4.32-MariaDB-debug-log source revision: 0c7af6a2a19343cb9d4fedbd7165b8f73bc4cf96
sql/signal_handler.cc:238(handle_fatal_signal)[0x5606bf364f8d]
sigaction.c:0(__restore_rt)[0x7fd4ede5b420]
sql/sql_select.cc:14381(update_depend_map_for_order(JOIN*, st_order*))[0x5606becc49ee]
sql/sql_select.cc:14477(remove_const(JOIN*, st_order*, Item*, bool, bool*))[0x5606becc51b7]
sql/sql_select.cc:2818(JOIN::optimize_stage2())[0x5606bec69e91]
sql/sql_select.cc:2394(JOIN::optimize_inner())[0x5606bec65402]
sql/sql_select.cc:1711(JOIN::optimize())[0x5606bec5e10d]
sql/sql_lex.cc:4232(st_select_lex::optimize_unflattened_subqueries(bool))[0x5606beb369e8]
sql/opt_subselect.cc:5603(JOIN::optimize_unflattened_subqueries())[0x5606bf0a858b]
sql/sql_select.cc:2942(JOIN::optimize_stage2())[0x5606bec6b48b]
sql/sql_select.cc:2394(JOIN::optimize_inner())[0x5606bec65402]
sql/sql_select.cc:1711(JOIN::optimize())[0x5606bec5e10d]
sql/sql_select.cc:4812(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x5606bec7f0f7]
sql/sql_select.cc:442(handle_select(THD*, LEX*, select_result*, unsigned long))[0x5606bec4fde0]
sql/sql_parse.cc:6475(execute_sqlcom_select(THD*, TABLE_LIST*))[0x5606bebbbbe4]
sql/sql_parse.cc:3978(mysql_execute_command(THD*))[0x5606beba935b]
sql/sql_parse.cc:8012(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x5606bebc50bf]
sql/sql_parse.cc:1860(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x5606beb9b4e5]
sql/sql_parse.cc:1378(do_command(THD*))[0x5606beb98010]
sql/sql_connect.cc:1420(do_handle_one_connection(CONNECT*))[0x5606befa5deb]
sql/sql_connect.cc:1325(handle_one_connection)[0x5606befa568f]
perfschema/pfs.cc:1871(pfs_spawn_thread)[0x5606bfc50274]
nptl/pthread_create.c:478(start_thread)[0x7fd4ede4f609]
Query (0x62b0000a1290): SELECT t0 . c6 AS c42 FROM ( SELECT t0 . c6 = TRIM( TRAILING FROM 96 ) SOUNDS LIKE CONVERT ( t0 . c6 , UNSIGNED ) >> PI ( ) AS c49 FROM t0 ) AS t1 JOIN t0 ON RTRIM ( - RAND ( -66 ) BETWEEN FIND_IN_SET ( 20 , UNHEX ( -80 ) IS NULL OR IF ( 85 , -83 , -113 ) ) AND -125 ) / EXP ( c21 ) = t1 . c49 ORDER BY c42 , ( c42 + ( SELECT c21 AS c61 FROM t0 WHERE t0 . c37 >= -19.601384 = RAND ( ) / TRIM( t0 . c21 FROM 'C@rG3D(#9*17(a.,rV' ) = -106 GROUP BY c21 , c42 HAVING c42 = -73 LIMIT 1 ) )