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

Replica crashes with assertion `is_null() || is_empty() || !check_name(*this)' in Lex_ident_db::Lex_ident_db on an event with default database `#mysql50#db`

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 13.2
    • N/A
    • Variables
    • None
    • Not for Release Notes

    Description

      Same assertion as MDEV-42180, on the replica: the master session has old_mode=MYSQL50_TABLE_NAMES, the replica applier runs with the default old_mode and gets the #mysql50# database as the default database of the event. Reproduced with statement, row and mixed binlog format.

      --source include/master-slave.inc
      let $D= `select @@datadir`;
      --mkdir $D/d-b
      --connection slave
      let $D= `select @@datadir`;
      --mkdir $D/d-b
      --connection master
      set old_mode=MYSQL50_TABLE_NAMES;
      use `#mysql50#d-b`;
      create table t1 (a int);
      --sync_slave_with_master
      --connection master
      drop database `#mysql50#d-b`;
      --source include/rpl_end.inc
      

      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  0x00005a8726a7c7a6 in my_write_core (sig=6) at /13.2/src/mysys/stacktrace.c:424
      #4  0x00005a8724d77890 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  0x00007d735b24527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #10 0x00007d735b2288ff in __GI_abort () at ./stdlib/abort.c:79
      #11 0x00007d735b22881b in __assert_fail_base (fmt=0x7d735b3d1208 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5a872400a280 "is_null() || is_empty() || !check_name(*this)", file=file@entry=0x5a872400a2e0 "/13.2/src/sql/lex_ident.h", line=line@entry=221, function=function@entry=0x5a872400a340 "Lex_ident_db::Lex_ident_db(const LEX_CSTRING&)") at ./assert/assert.c:96
      #12 0x00007d735b23b517 in __assert_fail (assertion=0x5a872400a280 "is_null() || is_empty() || !check_name(*this)", file=0x5a872400a2e0 "/13.2/src/sql/lex_ident.h", line=221, function=0x5a872400a340 "Lex_ident_db::Lex_ident_db(const LEX_CSTRING&)") at ./assert/assert.c:105
      #13 0x00005a8724dbb20c in Lex_ident_db::Lex_ident_db (this=0x757342593ea0, str=...) at /13.2/src/sql/lex_ident.h:221
      #14 0x00005a8724dbd40c in TABLE_LIST::init_one_table (this=0x757342c7c0c0, db_arg=<optimized out>, table_name_arg=0x52d00041a570, alias_arg=0x0, lock_type_arg=<optimized out>) at /13.2/src/sql/table.h:2728
      #15 0x00005a87258e0be5 in create_table_impl (thd=thd@entry=0x52c0001d0220, ddl_log_state_create=ddl_log_state_create@entry=0x75734278a840, ddl_log_state_rm=ddl_log_state_rm@entry=0x75734278a880, 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 0x00005a87258e35ac in mysql_create_table_no_lock (thd=thd@entry=0x52c0001d0220, ddl_log_state_create=ddl_log_state_create@entry=0x75734278a840, ddl_log_state_rm=ddl_log_state_rm@entry=0x75734278a880, create_info=create_info@entry=0x75734297cb60, alter_info=alter_info@entry=0x75734297c9a0, is_trans=is_trans@entry=0x75734278a830, create_table_mode=<optimized out>, table_list=<optimized out>) at /13.2/src/sql/sql_table.cc:5553
      #17 0x00005a87258e68ce in mysql_create_table (thd=thd@entry=0x52c0001d0220, create_table=create_table@entry=0x52d00041a540, create_info=create_info@entry=0x75734297cb60, alter_info=alter_info@entry=0x75734297c9a0) at /13.2/src/sql/sql_table.cc:5786
      #18 0x00005a87258e8ecd in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x52c0001d0220) at /13.2/src/sql/sql_table.cc:14345
      #19 0x00005a872562b07c in mysql_execute_command (thd=thd@entry=0x52c0001d0220, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /13.2/src/sql/sql_parse.cc:5954
      #20 0x00005a872562cf6b in mysql_parse (thd=0x52c0001d0220, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7573428aed80) at /13.2/src/sql/sql_parse.cc:8020
      #21 0x00005a87251d3ee7 in Query_log_event::do_apply_event (this=0x5130000d00e0, rgi=0x51d00029fe80, query_arg=<optimized out>, q_len_arg=<optimized out>) at /13.2/src/sql/log_event_server.cc:2133
      #22 0x00005a87251d5492 in Query_log_event::do_apply_event (this=<optimized out>, rgi=<optimized out>) at /13.2/src/sql/log_event_server.cc:1549
      #23 0x00005a8725197d56 in Log_event::apply_event (this=this@entry=0x5130000d00e0, rgi=rgi@entry=0x51d00029fe80) at /13.2/src/sql/log_event.cc:4500
      #24 0x00005a872530b903 in apply_event_and_update_pos_apply (ev=ev@entry=0x5130000d00e0, thd=thd@entry=0x52c0001d0220, rgi=rgi@entry=0x51d00029fe80, reason=reason@entry=0) at /13.2/src/sql/slave.cc:3663
      #25 0x00005a872531a99f in apply_event_and_update_pos (ev=ev@entry=0x5130000d00e0, thd=thd@entry=0x52c0001d0220, rgi=rgi@entry=0x51d00029fe80) at /13.2/src/sql/slave.cc:3840
      #26 0x00005a872531c21c in exec_relay_log_event (thd=thd@entry=0x52c0001d0220, rli=rli@entry=0x52b00004f6d0, serial_rgi=serial_rgi@entry=0x51d00029fe80) at /13.2/src/sql/slave.cc:4314
      #27 0x00005a87253206e9 in handle_slave_sql (arg=arg@entry=0x52b00004d200) at /13.2/src/sql/slave.cc:5549
      #28 0x00007d735c25ea42 in asan_thread_start (arg=0x757343a69000) at ../../../../src/libsanitizer/asan/asan_interceptors.cpp:234
      #29 0x00007d735b29cb84 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      #30 0x00007d735b329ecc 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:
              2 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.