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

Segfault in create federatedx table with empty hostname

    XMLWordPrintable

Details

    Description

      Reproduce

      --source have_federatedx.inc
      --source include/federated.inc
       
      --replace_result $SLAVE_MYPORT SLAVE_PORT
      eval CREATE TABLE federated.t1 (id int) ENGINE="FEDERATED"
      CONNECTION='mysql://root@:$SLAVE_MYPORT/federated/t1';
      DROP TABLE federated.t1;
       
      source include/federated_cleanup.inc;
      

      Result

      Thread 6 "mysqld" received signal SIGSEGV, Segmentation fault.
      [Switching to Thread 0x7fffedeb3300 (LWP 30694)]
      __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:120
      120     ../sysdeps/x86_64/multiarch/../strlen.S: No such file or directory.
      (gdb) bt
      #0  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:120
      #1  0x00000000006a04da in strlen ()
      #2  0x0000000000a334c4 in String::String (this=0x7fffedea52c0, str=0x0, cs=0x45c40a0 <my_charset_latin1>) at /home/midenok/src/mariadb/10.3/src/sql/sql_string.h:151
      #3  0x0000000001c4fba0 in get_server (share=0x7fffedea56e0, table=0x0) at /home/midenok/src/mariadb/10.3/src/storage/federatedx/ha_federatedx.cc:1524
      #4  0x0000000001c4c7fd in ha_federatedx::create (this=0x61c0000208a8, name=0x7fffedeaa190 "./federated/t1", table_arg=0x7fffedea5ea0, create_info=0x7fffedeaaaf0) at /home/midenok/src/mariadb/10.3/src/storage/federatedx/ha_federatedx.cc:3398
      #5  0x0000000001551f3c in handler::ha_create (this=0x61c0000208a8, name=0x7fffedeaa190 "./federated/t1", form=0x7fffedea5ea0, info_arg=0x7fffedeaaaf0) at /home/midenok/src/mariadb/10.3/src/sql/handler.cc:4714
      #6  0x000000000155892d in ha_create_table (thd=0x62a000060208, path=0x7fffedeaa190 "./federated/t1", db=0x62b000000380 "federated", table_name=0x62b000000398 "t1", create_info=0x7fffedeaaaf0, frm=0x7fffedeaa420) at /home/midenok/src/mariadb/10.3/src/sql/handler.cc:5177
      #7  0x0000000000fcc7bc in rea_create_table (thd=0x62a000060208, frm=0x7fffedeaa420, path=0x7fffedeaa190 "./federated/t1", db=0x62b000000380 "federated", table_name=0x62b000000398 "t1", create_info=0x7fffedeaaaf0, file=0x62b000000f80, no_ha_create_table=false) at /home/midenok/src/mariadb/10.3/src/sql/unireg.cc:514
      #8  0x0000000000e59732 in create_table_impl (thd=0x62a000060208, orig_db=0x62b000000420, orig_table_name=0x62b000000430, db=0x62b000000420, table_name=0x62b000000430, path=0x7fffedeaa190 "./federated/t1", options=..., create_info=0x7fffedeaaaf0, alter_info=0x7fffedeaacd0, create_table_mode=0, is_trans=0x7fffedeaa6e0, key_info=0x7fffedeaa160, key_count=0x7fffedeaa180, frm=0x7fffedeaa420) at /home/midenok/src/mariadb/10.3/src/sql/sql_table.cc:4970
      #9  0x0000000000e5720d in mysql_create_table_no_lock (thd=0x62a000060208, db=0x62b000000420, table_name=0x62b000000430, create_info=0x7fffedeaaaf0, alter_info=0x7fffedeaacd0, is_trans=0x7fffedeaa6e0, create_table_mode=0, table_list=0x62b000000408) at /home/midenok/src/mariadb/10.3/src/sql/sql_table.cc:5089
      #10 0x0000000000e5af13 in mysql_create_table (thd=0x62a000060208, create_table=0x62b000000408, create_info=0x7fffedeaaaf0, alter_info=0x7fffedeaacd0) at /home/midenok/src/mariadb/10.3/src/sql/sql_table.cc:5181
      #11 0x0000000000e97491 in Sql_cmd_create_table_like::execute (this=0x62b0000003d8, thd=0x62a000060208) at /home/midenok/src/mariadb/10.3/src/sql/sql_table.cc:11192
      #12 0x0000000000b68f1e in mysql_execute_command (thd=0x62a000060208) at /home/midenok/src/mariadb/10.3/src/sql/sql_parse.cc:6031
      #13 0x0000000000b47765 in mysql_parse (thd=0x62a000060208, rawbuf=0x62b000000228 "CREATE TABLE federated.t1 (id int) ENGINE=\"FEDERATED\"\nCONNECTION='mysql://root@:16021/federated/t1'", length=99, parser_state=0x7fffedeb0b00, is_com_multi=false, is_next_command=false) at /home/midenok/src/mariadb/10.3/src/sql/sql_parse.cc:7818
      

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              midenok Aleksey Midenkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.