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

Assertion `is_null() || is_empty() || !check_name(*this)' failed in Lex_ident_db::Lex_ident_db after USE `#mysql50#db` and a failed COM_CHANGE_USER

    XMLWordPrintable

Details

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

    Description

      . Same assertion as MDEV-42180 and MDEV-42189. COM_CHANGE_USER resets old_mode to the default, then fails with ER_WRONG_DB_NAME on the #mysql50# database; the session keeps the previous current database with the default old_mode.

      --source include/not_embedded.inc
      let $D= `select @@datadir`;
      --mkdir $D/d-b
      set old_mode=MYSQL50_TABLE_NAMES;
      use `#mysql50#d-b`;
      --error ER_WRONG_DB_NAME
      --change_user root,,#mysql50#d-b
      select database(), @@old_mode;
      create table x (a int);
      drop table x;
      use test;
      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:221: Lex_ident_db::Lex_ident_db(const LEX_CSTRING&): 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  0x00005a94e1d917a6 in my_write_core (sig=6) at /13.2/src/mysys/stacktrace.c:424
      #4  0x00005a94e008c890 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  0x00007c43afe4527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #10 0x00007c43afe288ff in __GI_abort () at ./stdlib/abort.c:79
      #11 0x00007c43afe2881b in __assert_fail_base (fmt=0x7c43affd1208 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5a94df31f280 "is_null() || is_empty() || !check_name(*this)", file=file@entry=0x5a94df31f2e0 "/13.2/src/sql/lex_ident.h", line=line@entry=221, function=function@entry=0x5a94df31f340 "Lex_ident_db::Lex_ident_db(const LEX_CSTRING&)") at ./assert/assert.c:96
      #12 0x00007c43afe3b517 in __assert_fail (assertion=0x5a94df31f280 "is_null() || is_empty() || !check_name(*this)", file=0x5a94df31f2e0 "/13.2/src/sql/lex_ident.h", line=221, function=0x5a94df31f340 "Lex_ident_db::Lex_ident_db(const LEX_CSTRING&)") at ./assert/assert.c:105
      #13 0x00005a94e00d020c in Lex_ident_db::Lex_ident_db (this=0x7c43a397aea0, str=...) at /13.2/src/sql/lex_ident.h:221
      #14 0x00005a94e00d240c in TABLE_LIST::init_one_table (this=0x7c43a40100c0, db_arg=<optimized out>, table_name_arg=0x52d0000f05f8, alias_arg=0x0, lock_type_arg=<optimized out>) at /13.2/src/sql/table.h:2728
      #15 0x00005a94e0bf5be5 in create_table_impl (thd=thd@entry=0x52c000080220, ddl_log_state_create=ddl_log_state_create@entry=0x7c43a3bd8640, ddl_log_state_rm=ddl_log_state_rm@entry=0x7c43a3bd8680, orig_db=..., orig_table_name=..., db=..., table_name=..., path=..., options=..., create_info=<optimized out>, alter_info=<optimized out>, create_table_mode=<optimized out>, is_trans=<optimized out>, key_info=<optimized out>, key_count=<optimized out>, frm=<optimized out>) at /13.2/src/sql/sql_table.cc:5189
      #16 0x00005a94e0bf85ac in mysql_create_table_no_lock (thd=thd@entry=0x52c000080220, ddl_log_state_create=ddl_log_state_create@entry=0x7c43a3bd8640, ddl_log_state_rm=ddl_log_state_rm@entry=0x7c43a3bd8680, create_info=create_info@entry=0x7c43a3d20b60, alter_info=alter_info@entry=0x7c43a3d209a0, is_trans=is_trans@entry=0x7c43a3bd8630, create_table_mode=<optimized out>, table_list=<optimized out>) at /13.2/src/sql/sql_table.cc:5553
      #17 0x00005a94e0bfb8ce in mysql_create_table (thd=thd@entry=0x52c000080220, create_table=create_table@entry=0x52d0000f05c8, create_info=create_info@entry=0x7c43a3d20b60, alter_info=alter_info@entry=0x7c43a3d209a0) at /13.2/src/sql/sql_table.cc:5786
      #18 0x00005a94e0bfdecd in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x52c000080220) at /13.2/src/sql/sql_table.cc:14345
      #19 0x00005a94e094007c 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:5954
      #20 0x00005a94e0941f6b in mysql_parse (thd=thd@entry=0x52c000080220, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7c43a3fc71b0) at /13.2/src/sql/sql_parse.cc:8020
      #21 0x00005a94e0945b4a in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x52c000080220, packet=packet@entry=0x529000249221 "create table x (a int)", packet_length=packet_length@entry=22, blocking=blocking@entry=true) at /13.2/src/sql/sql_parse.cc:1903
      #22 0x00005a94e094a31e in do_command (thd=thd@entry=0x52c000080220, blocking=blocking@entry=true) at /13.2/src/sql/sql_parse.cc:1437
      #23 0x00005a94e0dca2d3 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
      #24 0x00005a94e0dca6d9 in handle_one_connection (arg=arg@entry=0x50b000004cb0) at /13.2/src/sql/sql_connect.cc:1441
      #25 0x00007c43b0e5ea42 in asan_thread_start (arg=0x7c43ad710000) at ../../../../src/libsanitizer/asan/asan_interceptors.cpp:234
      #26 0x00007c43afe9cb84 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      #27 0x00007c43aff29ecc 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.