-
Bug
-
-
Critical
-
Resolution:
Fixed
-
10.5, 10.6, 10.11, 11.4, 11.8, 12.0
-
-
-
DELIMITER $$
|
CREATE PROCEDURE p0 (OUT a ROW(a INT,b INT))
|
BEGIN
|
SET a=ROW(0,0);
|
END; $$
|
DELIMITER ;
|
PREPARE s0 FROM 'CALL p0 (?)';
|
EXECUTE s0 USING @a;
|
Leads to:
CS 10.11.12 91de54e098b179f033deb1ee61fc3d7d5997f588 (Debug) Build 10/02/2025
|
mariadbd: /test/10.11_dbg/sql/sql_type.cc:7511: virtual bool Type_handler_row::Item_save_in_value(THD*, Item*, st_value*) const: Assertion `0' failed.
|
CS 10.11.12 91de54e098b179f033deb1ee61fc3d7d5997f588 (Debug) Build 10/02/2025
|
Core was generated by `/test/MD100225-mariadb-10.11.12-linux-x86_64-dbg/bin/mariadbd --no-defaults --m'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
|
|
[Current thread is 1 (Thread 0x151b6ffff6c0 (LWP 3294888))]
|
(gdb) bt
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
|
#1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
|
#2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
|
#3 0x0000151b77c4527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
|
#4 0x0000151b77c288ff in __GI_abort () at ./stdlib/abort.c:79
|
#5 0x0000151b77c2881b in __assert_fail_base (fmt=0x151b77dd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55971b0088be "0", file=file@entry=0x55971aea02a8 "/test/10.11_dbg/sql/sql_type.cc", line=line@entry=7511, function=function@entry=0x55971aea0a18 "virtual bool Type_handler_row::Item_save_in_value(THD*, Item*, st_value*) const") at ./assert/assert.c:96
|
#6 0x0000151b77c3b517 in __assert_fail (assertion=0x55971b0088be "0", file=0x55971aea02a8 "/test/10.11_dbg/sql/sql_type.cc", line=7511, function=0x55971aea0a18 "virtual bool Type_handler_row::Item_save_in_value(THD*, Item*, st_value*) const") at ./assert/assert.c:105
|
#7 0x000055971a61899d in Type_handler_row::Item_save_in_value (this=<optimized out>, thd=<optimized out>, item=<optimized out>, value=0x151b6fffccd0) at /test/10.11_dbg/sql/sql_type.cc:7511
|
#8 0x000055971a7042fe in Item::save_in_value (this=this@entry=0x151b1c015f80, thd=thd@entry=0x151b1c000d58, value=value@entry=0x151b6fffccd0)at /test/10.11_dbg/sql/item.h:1244
|
#9 0x000055971a6f928a in Item_param::set_value (this=0x151b1c0442e8, thd=0x151b1c000d58, ctx=<optimized out>, it=<optimized out>)at /test/10.11_dbg/sql/item.cc:5155
|
#10 0x000055971a3c6c6c in sp_head::bind_output_param (this=this@entry=0x151b1c0204b0, thd=thd@entry=0x151b1c000d58, arg_item=<optimized out>, arg_no=arg_no@entry=0, octx=octx@entry=0x151b1c013740, nctx=nctx@entry=0x151b1c015338)at /test/10.11_dbg/sql/sp_head.cc:2631
|
#11 0x000055971a3c8dcb in sp_head::execute_procedure (this=0x151b1c0204b0, thd=thd@entry=0x151b1c000d58, args=0x151b1c043358)at /test/10.11_dbg/sql/sp_head.cc:2509
|
#12 0x000055971a45d682 in do_execute_sp (thd=thd@entry=0x151b1c000d58, sp=sp@entry=0x151b1c0204b0) at /test/10.11_dbg/sql/sql_parse.cc:3089
|
#13 0x000055971a4616e7 in Sql_cmd_call::execute (this=0x151b1c0440f0, thd=0x151b1c000d58) at /test/10.11_dbg/sql/sql_parse.cc:3334
|
#14 0x000055971a46cc5d in mysql_execute_command (thd=0x151b1c000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=true)at /test/10.11_dbg/sql/sql_parse.cc:6167
|
#15 0x000055971a4916af in Prepared_statement::execute (this=this@entry=0x151b1c013188, expanded_query=expanded_query@entry=0x151b6fffdd10, open_cursor=open_cursor@entry=false)at /test/10.11_dbg/sql/sql_prepare.cc:5281
|
#16 0x000055971a493236 in Prepared_statement::execute_loop (this=this@entry=0x151b1c013188, expanded_query=expanded_query@entry=0x151b6fffdd10, open_cursor=open_cursor@entry=false, packet=packet@entry=0x0, packet_end=packet_end@entry=0x0) at /test/10.11_dbg/sql/sql_prepare.cc:4682
|
#17 0x000055971a493665 in mysql_sql_stmt_execute (thd=thd@entry=0x151b1c000d58)at /test/10.11_dbg/sql/sql_prepare.cc:3714
|
#18 0x000055971a46771a in mysql_execute_command (thd=thd@entry=0x151b1c000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/10.11_dbg/sql/sql_parse.cc:4028
|
#19 0x000055971a46d7dd in mysql_parse (thd=thd@entry=0x151b1c000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x151b6fffe2f0)at /test/10.11_dbg/sql/sql_parse.cc:8188
|
#20 0x000055971a46edf6 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x151b1c000d58, packet=packet@entry=0x151b1c00b029 "EXECUTE s0 USING @a", packet_length=packet_length@entry=19, blocking=blocking@entry=true)at /test/10.11_dbg/sql/sql_parse.cc:1905
|
#21 0x000055971a4702ca in do_command (thd=thd@entry=0x151b1c000d58, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_parse.cc:1418
|
#22 0x000055971a5966cf in do_handle_one_connection (connect=<optimized out>, connect@entry=0x559723d92548, put_in_cache=put_in_cache@entry=true)at /test/10.11_dbg/sql/sql_connect.cc:1386
|
#23 0x000055971a5968f4 in handle_one_connection (arg=0x559723d92548)at /test/10.11_dbg/sql/sql_connect.cc:1298
|
#24 0x0000151b77c9caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
|
#25 0x0000151b77d29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
|
Bug confirmed present in:
MariaDB: 10.5.29 (dbg), 10.6.21 (dbg), 10.11.12 (dbg), 11.4.6 (dbg), 11.7.2 (dbg), 11.8.0 (dbg), 11.8.1 (dbg), 12.0.0 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.5.29 (opt), 10.6.21 (opt), 10.11.12 (opt), 11.4.6 (opt), 11.7.2 (opt), 11.8.0 (opt), 11.8.1 (opt), 12.0.0 (opt)
OUT parameters in CREATE FUNCTION
Since 10.8 the problem is also repeatable with functions (in addition to procedures):
DELIMITER $$
|
CREATE OR REPLACE FUNCTION f0(OUT f0a ROW(a INT,b INT)) RETURNS BOOLEAN
|
BEGIN
|
SET f0a=ROW(1,2);
|
RETURN FALSE;
|
END; $$
|
CREATE OR REPLACE PROCEDURE p1()
|
BEGIN
|
PREPARE stmt FROM 'DO f0(?)';
|
EXECUTE stmt USING @a;
|
END $$
|
DELIMITER ;
|
CALL p1;
|
- relates to
-
MDEV-10654
IN, OUT, INOUT parameters in CREATE FUNCTION
-
-
Closed
{"report":{"fcp":1077.4000000953674,"ttfb":167.5,"pageVisibility":"visible","entityId":133020,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"229311fb-e563-4189-8c3d-9d3ad115534b","navigationType":0,"readyForUser":1170.2000002861023,"redirectCount":0,"resourceLoadedEnd":868,"resourceLoadedStart":172.7000002861023,"resourceTiming":[{"duration":418.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":172.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":172.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":590.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":418.1000003814697,"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":173,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":173,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":591.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":427,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":173.2000002861023,"connectEnd":173.2000002861023,"connectStart":173.2000002861023,"domainLookupEnd":173.2000002861023,"domainLookupStart":173.2000002861023,"fetchStart":173.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":173.2000002861023,"responseEnd":600.2000002861023,"responseStart":600.1000003814697,"secureConnectionStart":173.2000002861023},{"duration":493.40000009536743,"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":173.40000009536743,"connectEnd":173.40000009536743,"connectStart":173.40000009536743,"domainLookupEnd":173.40000009536743,"domainLookupStart":173.40000009536743,"fetchStart":173.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":173.40000009536743,"responseEnd":666.8000001907349,"responseStart":666.8000001907349,"secureConnectionStart":173.40000009536743},{"duration":498.1000003814697,"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":173.5,"connectEnd":173.5,"connectStart":173.5,"domainLookupEnd":173.5,"domainLookupStart":173.5,"fetchStart":173.5,"redirectEnd":0,"redirectStart":0,"requestStart":173.5,"responseEnd":671.6000003814697,"responseStart":671.6000003814697,"secureConnectionStart":173.5},{"duration":498.5,"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":173.60000038146973,"connectEnd":173.60000038146973,"connectStart":173.60000038146973,"domainLookupEnd":173.60000038146973,"domainLookupStart":173.60000038146973,"fetchStart":173.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":173.60000038146973,"responseEnd":672.1000003814697,"responseStart":672.1000003814697,"secureConnectionStart":173.60000038146973},{"duration":498.5,"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":173.80000019073486,"connectEnd":173.80000019073486,"connectStart":173.80000019073486,"domainLookupEnd":173.80000019073486,"domainLookupStart":173.80000019073486,"fetchStart":173.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":173.80000019073486,"responseEnd":672.3000001907349,"responseStart":672.3000001907349,"secureConnectionStart":173.80000019073486},{"duration":574.3999996185303,"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":174.10000038146973,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":174.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":748.5,"responseStart":0,"secureConnectionStart":0},{"duration":498.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":174.2000002861023,"connectEnd":174.2000002861023,"connectStart":174.2000002861023,"domainLookupEnd":174.2000002861023,"domainLookupStart":174.2000002861023,"fetchStart":174.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":174.2000002861023,"responseEnd":672.8000001907349,"responseStart":672.8000001907349,"secureConnectionStart":174.2000002861023},{"duration":574.2000002861023,"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":174.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":174.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":748.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":499.09999990463257,"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":174.60000038146973,"connectEnd":174.60000038146973,"connectStart":174.60000038146973,"domainLookupEnd":174.60000038146973,"domainLookupStart":174.60000038146973,"fetchStart":174.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":174.60000038146973,"responseEnd":673.7000002861023,"responseStart":673.7000002861023,"secureConnectionStart":174.60000038146973},{"duration":581.2000002861023,"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":186.90000009536743,"connectEnd":186.90000009536743,"connectStart":186.90000009536743,"domainLookupEnd":186.90000009536743,"domainLookupStart":186.90000009536743,"fetchStart":186.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":186.90000009536743,"responseEnd":768.1000003814697,"responseStart":768.1000003814697,"secureConnectionStart":186.90000009536743},{"duration":681,"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":187,"connectEnd":187,"connectStart":187,"domainLookupEnd":187,"domainLookupStart":187,"fetchStart":187,"redirectEnd":0,"redirectStart":0,"requestStart":187,"responseEnd":868,"responseStart":868,"secureConnectionStart":187},{"duration":91.39999961853027,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":778.1000003814697,"connectEnd":778.1000003814697,"connectStart":778.1000003814697,"domainLookupEnd":778.1000003814697,"domainLookupStart":778.1000003814697,"fetchStart":778.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":778.1000003814697,"responseEnd":869.5,"responseStart":869.5,"secureConnectionStart":778.1000003814697}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":13,"responseStart":168,"responseEnd":187,"domLoading":171,"domInteractive":1235,"domContentLoadedEventStart":1235,"domContentLoadedEventEnd":1286,"domComplete":2055,"loadEventStart":2055,"loadEventEnd":2057,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1213.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1214.6000003814697},{"name":"bigPipe.activity-panel-pipe-id.start","time":1214.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1217.4000000953674},{"name":"activityTabFullyLoaded","time":1335.2000002861023}],"measures":[],"correlationId":"7b5e437a8764ad","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":87,"dbReadsTimeInMs":10,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}