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

Assertion `is_null() || is_empty() || !check_name(*this)' failed in Lex_ident_db::Lex_ident_db in mysql_opt_change_db when a trigger of a table in a `#mysql50#` database fires 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 table `#mysql50#d-b`.t1 (a int);
      create trigger `#mysql50#d-b`.tr after insert on `#mysql50#d-b`.t1 for each row set @a=1;
      prepare s from 'insert into `#mysql50#d-b`.t1 values (1)';
      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:221: Lex_ident_db::Lex_ident_db(const LEX_CSTRING&): Assertion `is_null() || is_empty() || !check_name(*this)' failed.
       
      #9  0x00007ee07304527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #10 0x00007ee0730288ff in __GI_abort () at ./stdlib/abort.c:79
      #11 0x00007ee07302881b in __assert_fail_base (fmt=0x7ee0731d1208 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5629934a9280 "is_null() || is_empty() || !check_name(*this)", file=file@entry=0x5629934a92e0 "/13.2/src/sql/lex_ident.h", line=line@entry=221, function=function@entry=0x5629934a9340 "Lex_ident_db::Lex_ident_db(const LEX_CSTRING&)") at ./assert/assert.c:96
      #12 0x00007ee07303b517 in __assert_fail (assertion=0x5629934a9280 "is_null() || is_empty() || !check_name(*this)", file=0x5629934a92e0 "/13.2/src/sql/lex_ident.h", line=221, function=0x5629934a9340 "Lex_ident_db::Lex_ident_db(const LEX_CSTRING&)") at ./assert/assert.c:105
      #13 0x000056299425a20c in Lex_ident_db::Lex_ident_db (this=0x7ee066cd2cc0, str=...) at /13.2/src/sql/lex_ident.h:221
      #14 0x00005629949910eb in mysql_opt_change_db (thd=thd@entry=0x52c000080220, new_db=..., saved_db=saved_db@entry=0x7ee067047840, force_switch=force_switch@entry=false, cur_db_changed=cur_db_changed@entry=0x7ee067047820) at /13.2/src/sql/sql_db.cc:1921
      #15 0x00005629948056c7 in sp_head::execute (this=this@entry=0x5250001e5148, thd=thd@entry=0x52c000080220, merge_da_on_success=merge_da_on_success@entry=false) at /13.2/src/sql/sp_head.cc:1192
      #16 0x00005629948084a3 in sp_head::execute_trigger (this=0x5250001e5148, thd=thd@entry=0x52c000080220, db_name=<optimized out>, table_name=<optimized out>, grant_info=grant_info@entry=0x5250001e3b88) at /13.2/src/sql/sp_head.cc:1878
      #17 0x0000562994db8ef4 in Table_triggers_list::process_triggers (this=0x5250001e3518, thd=0x52c000080220, event=event@entry=TRG_EVENT_INSERT, time_type=time_type@entry=TRG_ACTION_AFTER, old_row_is_record1=old_row_is_record1@entry=true, skip_row_indicator=skip_row_indicator@entry=0x0, fields_in_update_stmt=<optimized out>) at /13.2/src/sql/sql_trigger.cc:2917
      #18 0x00005629949f7403 in Write_record::after_ins_trg (this=this@entry=0x7ee06703b370) at /13.2/src/sql/sql_insert.cc:2580
      #19 0x00005629949f75a7 in Write_record::after_insert (this=this@entry=0x7ee06703b370, inserted=inserted@entry=0x7ee066cd1720) at /13.2/src/sql/sql_insert.cc:2572
      #20 0x00005629949d9140 in Write_record::single_insert (this=this@entry=0x7ee06703b370, inserted=inserted@entry=0x7ee066cd1720) at /13.2/src/sql/sql_insert.cc:2433
      #21 0x00005629949db199 in Write_record::write_record (this=this@entry=0x7ee06703b370) at /13.2/src/sql/sql_insert.cc:2463
      #22 0x00005629949f391c in mysql_insert (thd=thd@entry=0x52c000080220, table_list=0x52d000318578, fields=..., values_list=..., update_fields=..., update_values=..., duplic=<optimized out>, ignore=<optimized out>, result=<optimized out>) at /13.2/src/sql/sql_insert.cc:1238
      #23 0x0000562994ac1d58 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:4555
      #24 0x0000562994b4bb3c in Prepared_statement::execute (this=this@entry=0x51a0000114a0, expanded_query=expanded_query@entry=(String *) 0x7ee066f032e0 _binary ..., open_cursor=open_cursor@entry=false, result_arg=result_arg@entry=0x51a0000115f0, cursor_arg=cursor_arg@entry=0x51a000011660) at /13.2/src/sql/sql_prepare.cc:5601
      #25 0x0000562994b52298 in Prepared_statement::execute_loop (this=this@entry=0x51a0000114a0, expanded_query=expanded_query@entry=(String *) 0x7ee066f032e0 _binary ..., open_cursor=open_cursor@entry=false, result_arg=result_arg@entry=0x51a0000115f0, cursor_arg=cursor_arg@entry=0x51a000011660, instrs_set_placeholder=..., packet=<optimized out>, packet_end=<optimized out>) at /13.2/src/sql/sql_prepare.cc:4902
      #26 0x0000562994b5333c in mysql_sql_stmt_execute (thd=thd@entry=0x52c000080220, name=..., cmd=cmd@entry=0x56299369eea0 "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
      #27 0x0000562994b53b11 in mysql_sql_stmt_execute (thd=thd@entry=0x52c000080220) at /13.2/src/sql/sql_prepare.cc:3818
      #28 0x0000562994abf708 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
      #29 0x0000562994acbf6b in mysql_parse (thd=thd@entry=0x52c000080220, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7ee0672e41b0) at /13.2/src/sql/sql_parse.cc:8020
      #30 0x0000562994acfb4a 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
      #31 0x0000562994ad431e in do_command (thd=thd@entry=0x52c000080220, blocking=blocking@entry=true) at /13.2/src/sql/sql_parse.cc:1437
      #32 0x0000562994f542d3 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
      #33 0x0000562994f546d9 in handle_one_connection (arg=arg@entry=0x50b000004cb0) at /13.2/src/sql/sql_connect.cc:1441
      #34 0x00007ee07405ea42 in asan_thread_start (arg=0x7ee070700000) at ../../../../src/libsanitizer/asan/asan_interceptors.cpp:234
      #35 0x00007ee07309cb84 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      #36 0x00007ee073129ecc 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.