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

Server crash / assertion failure in Compare_identifiers::operator upon dropping period with empty name

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11
    • 10.5, 10.6, 10.11
    • Parser, Versioned Tables
    • None

    Description

      Apparently the fix for MDEV-18873 was incomplete.

      create table t (a int);
      alter table t drop period if exists for ``;
       
      # Cleanup
      drop table t;
      

      10.4 f97f6955 debug

      mysqld: /src/sql/vers_string.h:42: int Compare_identifiers::operator()(const LEX_CSTRING&, const LEX_CSTRING&) const: Assertion `a.str != __null' failed.
      221224 22:37:03 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fab0b0b0662 in __GI___assert_fail (assertion=0x55bf3032bfc0 "a.str != __null", file=0x55bf3032bec0 "/src/sql/vers_string.h", line=42, function=0x55bf3032bf40 "int Compare_identifiers::operator()(const LEX_CSTRING&, const LEX_CSTRING&) const") at assert.c:101
      #8  0x000055bf2e6a3b87 in Compare_identifiers::operator() (this=0x7fab016b3880, a=..., b=...) at /src/sql/vers_string.h:42
      #9  0x000055bf2e6bf7d3 in Lex_cstring_with_compare<Compare_identifiers>::streq (this=0x61b00003a1f0, b=...) at /src/sql/vers_string.h:93
      #10 0x000055bf2e77b56c in handle_if_exists_options (thd=0x62b00005b208, table=0x62000003c088, alter_info=0x7fab016b7120, period_info=0x7fab016b73c8) at /src/sql/sql_table.cc:6372
      #11 0x000055bf2e795c7e in mysql_alter_table (thd=0x62b00005b208, new_db=0x62b00005fa10, new_name=0x62b00005fe38, create_info=0x7fab016b7220, table_list=0x62b000062358, alter_info=0x7fab016b7120, order_num=0, order=0x0, ignore=false) at /src/sql/sql_table.cc:9977
      #12 0x000055bf2e91883a in Sql_cmd_alter_table::execute (this=0x62b000062ab0, thd=0x62b00005b208) at /src/sql/sql_alter.cc:530
      #13 0x000055bf2e532aa6 in mysql_execute_command (thd=0x62b00005b208) at /src/sql/sql_parse.cc:6195
      #14 0x000055bf2e53e05c in mysql_parse (thd=0x62b00005b208, rawbuf=0x62b000062228 "alter table t drop period if exists for ``", length=42, parser_state=0x7fab016b9800, is_com_multi=false, is_next_command=false) at /src/sql/sql_parse.cc:7984
      #15 0x000055bf2e514fc5 in dispatch_command (command=COM_QUERY, thd=0x62b00005b208, packet=0x62900023f209 "alter table t drop period if exists for ``", packet_length=42, is_com_multi=false, is_next_command=false) at /src/sql/sql_parse.cc:1857
      #16 0x000055bf2e511b64 in do_command (thd=0x62b00005b208) at /src/sql/sql_parse.cc:1378
      #17 0x000055bf2e900520 in do_handle_one_connection (connect=0x608000000da8) at /src/sql/sql_connect.cc:1420
      #18 0x000055bf2e8ffe06 in handle_one_connection (arg=0x608000000da8) at /src/sql/sql_connect.cc:1324
      #19 0x000055bf2f53c48b in pfs_spawn_thread (arg=0x615000004e08) at /src/storage/perfschema/pfs.cc:1869
      #20 0x00007fab0b58eea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #21 0x00007fab0b17baef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.4 e9dc3957 non-debug

      #3  <signal handler called>
      #4  my_strcasecmp_utf8 (cs=<optimized out>, s=0x0, t=0x7f97480108f0 "") at /data/src/10.4/strings/ctype-utf8.c:5107
      #5  0x0000557f91b0484a in Compare_identifiers::operator() (b=..., a=..., this=<optimized out>) at /data/src/10.4/sql/vers_string.h:46
      #6  Lex_cstring_with_compare<Compare_identifiers>::streq (b=..., this=0x7f9748092828) at /data/src/10.4/sql/vers_string.h:93
      #7  Lex_cstring_with_compare<Compare_identifiers>::streq (b=..., this=0x7f9748092828) at /data/src/10.4/sql/vers_string.h:91
      #8  handle_if_exists_options (period_info=0x7f976407d4d8, alter_info=0x7f976407d270, table=<optimized out>, thd=0x557f92926a18 <system_charset_info>) at /data/src/10.4/sql/sql_table.cc:6368
      #9  mysql_alter_table (thd=thd@entry=0x7f9748000c48, new_db=new_db@entry=0x7f9748005290, new_name=new_name@entry=0x7f97480056b8, create_info=create_info@entry=0x7f976407d330, table_list=<optimized out>, table_list@entry=0x7f97480101f0, alter_info=alter_info@entry=0x7f976407d270, order_num=0, order=0x0, ignore=false) at /data/src/10.4/sql/sql_table.cc:9971
      #10 0x0000557f91b5a26b in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x7f9748000c48) at /data/src/10.4/sql/sql_alter.cc:530
      #11 0x0000557f91a677c9 in mysql_execute_command (thd=0x7f9748000c48) at /data/src/10.4/sql/sql_parse.cc:6193
      #12 0x0000557f91a6d482 in mysql_parse (thd=0x7f9748000c48, rawbuf=<optimized out>, length=42, parser_state=0x7f976407f560, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.4/sql/sql_parse.cc:7982
      #13 0x0000557f91a6f6cc in dispatch_command (command=COM_QUERY, thd=0x7f9748000c48, packet=0x7f9748007d49 "alter table t drop period if exists for ``", packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.4/sql/sql_class.h:227
      #14 0x0000557f91a70db8 in do_command (thd=0x7f9748000c48) at /data/src/10.4/sql/sql_parse.cc:1378
      #15 0x0000557f91b55ffc in do_handle_one_connection (connect=connect@entry=0x557f938272d8) at /data/src/10.4/sql/sql_connect.cc:1420
      #16 0x0000557f91b56142 in handle_one_connection (arg=arg@entry=0x557f938272d8) at /data/src/10.4/sql/sql_connect.cc:1324
      #17 0x0000557f91e81653 in pfs_spawn_thread (arg=0x557f937b57b8) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #18 0x00007f97695e0ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #19 0x00007f97691cdaef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.