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

Assertion `!mysql_parse_status || thd->is_error() || thd->get_internal_handler()' failed in bool parse_sql(THD*, Parser_state*, Object_creation_ctx*, bool)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 11.4, 11.6(EOL), 11.7
    • N/A
    • Parser
    • None

    Description

      CREATE TABLE t (c INT);
      SET GLOBAL log_output='TABLE',GLOBAL general_log=1;
      EXPLAIN SELECT * FROM t LIMIT ROWS EXAMINED 0;
      CREATE PACKAGE BODY t AS FUNCTION f2 RETURN INT AS BEGIN RETURN 1;
      

      Leads to:

      CS 11.7.0 5bbda9711131845ae6b4315a268b4d1710943a85 (Debug)

      mariadbd: /test/11.7_dbg/sql/sql_parse.cc:10272: bool parse_sql(THD*, Parser_state*, Object_creation_ctx*, bool): Assertion `!mysql_parse_status || thd->is_error() || thd->get_internal_handler()' failed.
      

      CS 11.7.0 5bbda9711131845ae6b4315a268b4d1710943a85 (Debug)

      Core was generated by `/test/MD090924-mariadb-11.7.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x14fa441b0700 (LWP 1001683))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014fa5bf5e859 in __GI_abort () at abort.c:79
      #2  0x000014fa5bf5e729 in __assert_fail_base (fmt=0x14fa5c0f4588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x56441b482bc0 "!mysql_parse_status || thd->is_error() || thd->get_internal_handler()", file=0x56441b481ce8 "/test/11.7_dbg/sql/sql_parse.cc", line=10272, function=<optimized out>) at assert.c:92
      #3  0x000014fa5bf6ffd6 in __GI___assert_fail (assertion=assertion@entry=0x56441b482bc0 "!mysql_parse_status || thd->is_error() || thd->get_internal_handler()", file=file@entry=0x56441b481ce8 "/test/11.7_dbg/sql/sql_parse.cc", line=line@entry=10272, function=function@entry=0x56441b482ae0 "bool parse_sql(THD*, Parser_state*, Object_creation_ctx*, bool)") at assert.c:101
      #4  0x000056441a70b147 in parse_sql (thd=thd@entry=0x14fa0c000d48, parser_state=parser_state@entry=0x14fa441af270, creation_ctx=creation_ctx@entry=0x0, do_pfs_digest=do_pfs_digest@entry=true) at /test/11.7_dbg/sql/sql_class.h:5119
      #5  0x000056441a7054f6 in mysql_parse (thd=thd@entry=0x14fa0c000d48, rawbuf=<optimized out>, length=65, parser_state=parser_state@entry=0x14fa441af270) at /test/11.7_dbg/sql/sql_parse.cc:7828
      #6  0x000056441a71cad1 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14fa0c000d48, packet=packet@entry=0x14fa0c00b249 "CREATE PACKAGE BODY t AS FUNCTION f2 RETURN INT AS BEGIN RETURN 1", packet_length=packet_length@entry=65, blocking=blocking@entry=true) at /test/11.7_dbg/sql/sql_class.h:1639
      #7  0x000056441a71f5d4 in do_command (thd=0x14fa0c000d48, blocking=blocking@entry=true) at /test/11.7_dbg/sql/sql_parse.cc:1405
      #8  0x000056441a8a9067 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x56441f0174d8, put_in_cache=put_in_cache@entry=true) at /test/11.7_dbg/sql/sql_connect.cc:1448
      #9  0x000056441a8a9628 in handle_one_connection (arg=arg@entry=0x56441f0174d8) at /test/11.7_dbg/sql/sql_connect.cc:1350
      #10 0x000056441ad370fe in pfs_spawn_thread (arg=0x56441ef67288) at /test/11.7_dbg/storage/perfschema/pfs.cc:2198
      #11 0x000014fa5c46f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #12 0x000014fa5c05b133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 11.4.4 (dbg), 11.6.2 (dbg), 11.7.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.5.27 (dbg), 10.5.27 (opt), 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.1.7 (dbg), 11.1.7 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (opt), 11.6.2 (opt), 11.7.0 (opt)

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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