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

Assertion `is_null() || is_empty() || !check_name(*this)' failed in Lex_ident_db::Lex_ident_db on EXECUTE of a prepared CALL of a routine in a `#mysql50#` database after old_mode reset

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 13.2
    • 13.2
    • None
    • None

    Description

      let $D= `select @@datadir`;
      --mkdir $D/d-b
      set old_mode=MYSQL50_TABLE_NAMES;
      create procedure `#mysql50#d-b`.p() select 1;
      prepare s from 'call `#mysql50#d-b`.p()';
      execute s;
      set old_mode=default;
      execute s;
      set old_mode=MYSQL50_TABLE_NAMES;
      drop database `#mysql50#d-b`;
      

      13.2.0-MariaDB-asan-debug-log source revision: dc266b6ff7610fbb10b00c86be47b9c7e86670e0
      mariadbd: /13.2/src/sql/lex_ident.h:226: Lex_ident_db::Lex_ident_db(const char*, size_t): Assertion `is_null() || is_empty() || !check_name(*this)' failed.
       
      #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=6) at ./nptl/pthread_kill.c:89
      #3  0x00005e442e2f77a6 in my_write_core (sig=6) at /13.2/src/mysys/stacktrace.c:424
      #4  0x00005e442c5f2890 in handle_fatal_signal (sig=6) at /13.2/src/sql/signal_handler.cc:300
      #5  <signal handler called>
      #6  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      #7  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
      #8  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #9  0x00007596bf64527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #10 0x00007596bf6288ff in __GI_abort () at ./stdlib/abort.c:79
      #11 0x00007596bf62881b in __assert_fail_base (fmt=0x7596bf7d1208 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5e442b9b90a0 "is_null() || is_empty() || !check_name(*this)", file=file@entry=0x5e442b9b9100 "/13.2/src/sql/lex_ident.h", line=line@entry=226, function=function@entry=0x5e442b9b9160 "Lex_ident_db::Lex_ident_db(const char*, size_t)") at ./assert/assert.c:96
      #12 0x00007596bf63b517 in __assert_fail (assertion=0x5e442b9b90a0 "is_null() || is_empty() || !check_name(*this)", file=0x5e442b9b9100 "/13.2/src/sql/lex_ident.h", line=226, function=0x5e442b9b9160 "Lex_ident_db::Lex_ident_db(const char*, size_t)") at ./assert/assert.c:105
      #13 0x00005e442cb70f10 in Lex_ident_db::Lex_ident_db (this=0x7596b32021a0, str=<optimized out>, length=<optimized out>) at /13.2/src/sql/lex_ident.h:226
      #14 0x00005e442cbc9392 in sp_name::sp_name (this=this@entry=0x7596b354fc20, key=key@entry=0x52d0003185c0, qname_buff=qname_buff@entry=0x7596b354fc70 "") at /13.2/src/sql/sp_head.cc:478
      #15 0x00005e442cbc061f in Sroutine_hash_entry::sp_cache_routine (this=this@entry=0x52d0003185a0, thd=thd@entry=0x52c000080220, sp=sp@entry=0x7596b3202120) at /13.2/src/sql/sp.cc:2981
      #16 0x00005e442ccc5ed8 in open_and_process_routine (thd=thd@entry=0x52c000080220, prelocking_ctx=<optimized out>, rt=rt@entry=0x52d0003185a0, prelocking_strategy=prelocking_strategy@entry=0x7596b311fa60, has_prelocking_list=<optimized out>, ot_ctx=ot_ctx@entry=0x7596b335baa0, need_prelocking=<optimized out>, routine_modifies_data=<optimized out>) at /13.2/src/sql/sql_base.cc:4086
      #17 0x00005e442cceea81 in open_tables (thd=thd@entry=0x52c000080220, options=..., start=start@entry=0x7596b335b940, counter=counter@entry=0x7596b335b930, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x7596b311fa60) at /13.2/src/sql/sql_base.cc:5038
      #18 0x00005e442ccf016c in open_and_lock_tables (thd=thd@entry=0x52c000080220, options=..., tables=tables@entry=0x0, derived=derived@entry=true, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x7596b311fa60) at /13.2/src/sql/sql_base.cc:6049
      #19 0x00005e442ca5b1d6 in open_and_lock_tables (thd=0x52c000080220, tables=<optimized out>, derived=true, flags=<optimized out>) at /13.2/src/sql/sql_base.h:545
      #20 0x00005e442ce85c91 in Sql_cmd_call::execute (this=0x52d000318788, thd=0x52c000080220) at /13.2/src/sql/sql_parse.cc:3300
      #21 0x00005e442cea607c in mysql_execute_command (thd=0x52c000080220, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=true) at /13.2/src/sql/sql_parse.cc:5954
      #22 0x00005e442cf27b3c in Prepared_statement::execute (this=this@entry=0x51a000010ea0, expanded_query=expanded_query@entry=(String *) 0x7596b344b2e0 _binary ..., open_cursor=open_cursor@entry=false, result_arg=result_arg@entry=0x51a000010ff0, cursor_arg=cursor_arg@entry=0x51a000011060) at /13.2/src/sql/sql_prepare.cc:5601
      #23 0x00005e442cf2e298 in Prepared_statement::execute_loop (this=this@entry=0x51a000010ea0, expanded_query=expanded_query@entry=(String *) 0x7596b344b2e0 _binary ..., open_cursor=open_cursor@entry=false, result_arg=result_arg@entry=0x51a000010ff0, cursor_arg=cursor_arg@entry=0x51a000011060, instrs_set_placeholder=..., packet=<optimized out>, packet_end=<optimized out>) at /13.2/src/sql/sql_prepare.cc:4902
      #24 0x00005e442cf2f33c in mysql_sql_stmt_execute (thd=thd@entry=0x52c000080220, name=..., cmd=cmd@entry=0x5e442ba7aea0 "EXECUTE", open_dynamic_cursor=open_dynamic_cursor@entry=false, result_arg=result_arg@entry=0x0, cursor_arg=cursor_arg@entry=0x0) at /13.2/src/sql/sql_prepare.cc:3795
      #25 0x00005e442cf2fb11 in mysql_sql_stmt_execute (thd=thd@entry=0x52c000080220) at /13.2/src/sql/sql_prepare.cc:3818
      #26 0x00005e442ce9b708 in mysql_execute_command (thd=thd@entry=0x52c000080220, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /13.2/src/sql/sql_parse.cc:4060
      #27 0x00005e442cea7f6b in mysql_parse (thd=thd@entry=0x52c000080220, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7596b38281b0) at /13.2/src/sql/sql_parse.cc:8020
      #28 0x00005e442ceabb4a in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x52c000080220, packet=packet@entry=0x529000249221 "execute s", packet_length=packet_length@entry=9, blocking=blocking@entry=true) at /13.2/src/sql/sql_parse.cc:1903
      #29 0x00005e442ceb031e in do_command (thd=thd@entry=0x52c000080220, blocking=blocking@entry=true) at /13.2/src/sql/sql_parse.cc:1437
      #30 0x00005e442d3302d3 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x50b000004cb0, put_in_cache=put_in_cache@entry=true) at /13.2/src/sql/sql_connect.cc:1529
      #31 0x00005e442d3306d9 in handle_one_connection (arg=arg@entry=0x50b000004cb0) at /13.2/src/sql/sql_connect.cc:1441
      #32 0x00007596c065ea42 in asan_thread_start (arg=0x7596bd119000) at ../../../../src/libsanitizer/asan/asan_interceptors.cpp:234
      #33 0x00007596bf69cb84 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      #34 0x00007596bf729ecc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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