Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-40244

Assertion `0' failed in virtual my_var *Type_handler_row::make_outvar_field(THD *, const Lex_ident_sys_st &, const sp_rcontext_addr &, const Lex_ident_sys_st &, sp_head *, bool) const

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 12.3, 13.0, 13.1
    • 12.3, 13.0
    • Stored routines
    • None
    • Can result in hang or crash

    Description

      SET sql_mode=ORACLE;
      CREATE TABLE t (id INT PRIMARY KEY, a INT, b INT);
      INSERT INTO t VALUES (1,5,6);
       
      DELIMITER $$;
      CREATE PROCEDURE p1 AS r t%ROWTYPE;
      BEGIN 
      	SELECT a INTO r.a FROM t WHERE id=1; 
      END;
      $$
      DELIMITER ;$$
      CALL p1;
      

      Leads to:

      CS 12.3.3 8fd382adf6380ee299937b831ffdb4f22eaab37e (Debug, Clang 18.1.3-11) Build 02/06/2026

      mariadbd: /test/12.3_dbg/sql/sql_type_row.cc:165: virtual my_var *Type_handler_row::make_outvar_field(THD *, const Lex_ident_sys_st &, const sp_rcontext_addr &, const Lex_ident_sys_st &, sp_head *, bool) const: Assertion `0' failed.
      

      CS 12.3.3 8fd382adf6380ee299937b831ffdb4f22eaab37e (Debug, Clang 18.1.3-11) Build 02/06/2026

      Core was generated by `/test/MD020626-mariadb-12.3.3-linux-x86_64-dbg/bin/mariadbd --no-defaults --loo'.
      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 (LWP 322513)]
      (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  0x000070ebf924527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x000070ebf92288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000070ebf922881b in __assert_fail_base (fmt=0x70ebf93d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55b9046add59 "0", file=file@entry=0x55b9045d5fb6 "/test/12.3_dbg/sql/sql_type_row.cc", line=line@entry=165, function=function@entry=0x55b9045d5fd9 "virtual my_var *Type_handler_row::make_outvar_field(THD *, const Lex_ident_sys_st &, const sp_rcontext_addr &, const Lex_ident_sys_st &, sp_head *, bool) const") at ./assert/assert.c:96
      #6  0x000070ebf923b517 in __assert_fail (assertion=0x55b9046add59 "0", file=0x55b9045d5fb6 "/test/12.3_dbg/sql/sql_type_row.cc", line=165, function=0x55b9045d5fd9 "virtual my_var *Type_handler_row::make_outvar_field(THD *, const Lex_ident_sys_st &, const sp_rcontext_addr &, const Lex_ident_sys_st &, sp_head *, bool) const") at ./assert/assert.c:105
      #7  0x000055b9037ad8d5 in Type_handler_row::make_outvar_field (this=0x55b90527a8c8 <type_handler_row_internal>, thd=0x68c948000d60, name=@0x70e818742aa0: {<st_mysql_const_lex_string> = {str = 0x68c94807bb70 "r", length = 1}, <Sql_alloc> = {<No data fields>}, <No data fields>}, addr=@0x70e81873b2f8: {m_rcontext_handler = 0x55b9050026b0 <sp_rcontext_handler_local>, m_offset = 0}, field=@0x70e818742ad0: {<st_mysql_const_lex_string> = {str = 0x68c94807bb90 "a", length = 1}, <Sql_alloc> = {<No data fields>}, <No data fields>}, sphead=0x68c948079e80, validate_only=false)at /test/12.3_dbg/sql/sql_type_row.cc:165
      #8  0x000055b90340b74f in LEX::create_outvar (this=0x68c94807ea90, thd=0x68c948000d60, a=@0x70e818742aa0: {<st_mysql_const_lex_string> = {str = 0x68c94807bb70 "r", length = 1}, <Sql_alloc> = {<No data fields>}, <No data fields>}, b=@0x70e818742ad0: {<st_mysql_const_lex_string> = {str = 0x68c94807bb90 "a", length = 1}, <Sql_alloc> = {<No data fields>}, <No data fields>})at /test/12.3_dbg/sql/sql_lex.cc:9059
      #9  0x000055b9038327f5 in ORAparse (thd=0x68c948000d60)at /test/12.3_dbg/sql/sql_yacc.yy:13771
      #10 0x000055b903456b6a in parse_sql (thd=0x68c948000d60, parser_state=0x70e8187439f0, creation_ctx=0x0, do_pfs_digest=true)at /test/12.3_dbg/sql/sql_parse.cc:10374
      #11 0x000055b90343ef63 in mysql_parse (thd=0x68c948000d60, rawbuf=0x68c94801a3b0 "CREATE PROCEDURE p1 AS r t%ROWTYPE;\nBEGIN \nSELECT a INTO r.a FROM t WHERE id=1; \nEND", length=84, parser_state=0x70e8187439f0)at /test/12.3_dbg/sql/sql_parse.cc:7899
      #12 0x000055b90343c41d in dispatch_command (command=COM_QUERY, thd=0x68c948000d60, packet=0x68c94800b5e1 "CREATE PROCEDURE p1 AS r t%ROWTYPE;\nBEGIN \nSELECT a INTO r.a FROM t WHERE id=1; \nEND;", packet_length=85, blocking=true)at /test/12.3_dbg/sql/sql_parse.cc:1903
      #13 0x000055b90343fc83 in do_command (thd=0x68c948000d60, blocking=true)at /test/12.3_dbg/sql/sql_parse.cc:1437
      #14 0x000055b90363c509 in do_handle_one_connection (connect=0x55b91d60b740, put_in_cache=true) at /test/12.3_dbg/sql/sql_connect.cc:1503
      #15 0x000055b90363c2ae in handle_one_connection (arg=0x55b91d60dfe0)at /test/12.3_dbg/sql/sql_connect.cc:1415
      #16 0x000070ebf929caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #17 0x000070ebf9329c6c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed
      CS  10.11  dbg  020626  612f4e2fd810423793b3bc878c3b1c00f5af25fb  No bug found
      CS  10.11  opt  020626  612f4e2fd810423793b3bc878c3b1c00f5af25fb  No bug found
      CS  11.4   dbg  020626  d2ebea4febdbc102da09a3b51bea4ef2819a3843  No bug found
      CS  11.4   opt  020626  d2ebea4febdbc102da09a3b51bea4ef2819a3843  No bug found
      CS  11.8   dbg  020626  080a7318acc2fc578b5915d1908f838b6f942de0  No bug found
      CS  11.8   opt  020626  080a7318acc2fc578b5915d1908f838b6f942de0  No bug found
      CS  12.3   dbg  020626  8fd382adf6380ee299937b831ffdb4f22eaab37e  0|SIGABRT|Type_handler_row::make_outvar_field|LEX::create_outvar|ORAparse|parse_sql
      CS  12.3   opt  020626  8fd382adf6380ee299937b831ffdb4f22eaab37e  No bug found
      CS  13.0   dbg  220526  c8e8d33309606e682c98675d594dbd23ebc2ddf6  0|SIGABRT|Type_handler_row::make_outvar_field|LEX::create_outvar|ORAparse|parse_sql
      CS  13.0   opt  220526  c8e8d33309606e682c98675d594dbd23ebc2ddf6  No bug found
      CS  13.1   dbg  020626  a06be0288f63f520aec95982cc6f872d26c4f23c  0|SIGABRT|Type_handler_row::make_outvar_field|LEX::create_outvar|ORAparse|parse_sql
      CS  13.1   opt  020626  a06be0288f63f520aec95982cc6f872d26c4f23c  No bug found
      ES  10.6   dbg  040825  9b794f34b48fb7eee490b6da44edc0f33a947447  No bug found
      ES  10.6   opt  040825  9b794f34b48fb7eee490b6da44edc0f33a947447  No bug found
      ES  11.4   dbg  040825  a1c03ccd54b582e75506687ee19b273ca897f261  No bug found
      ES  11.4   opt  040825  a1c03ccd54b582e75506687ee19b273ca897f261  No bug found
      ES  11.8   dbg  151025  780565c207e9ce0ebf7d8e3d59f223801447b619  0|SIGABRT|Type_handler_row::make_outvar_field|LEX::create_outvar|ORAparse|parse_sql
      ES  11.8   opt  151025  780565c207e9ce0ebf7d8e3d59f223801447b619  No bug found
      

      Attachments

        Activity

          People

            bar Alexander Barkov
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 0.5h
                0.5h

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.