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

Crash with CONNECT + Informix ODBC driver + discovery

    XMLWordPrintable

Details

    Description

      I've installed Informix 11..70 from this binaries:

      rw-rw-r- 1 openxs openxs 483799040 вер 11 17:31 iif.11.70.FC8DE.linux-x86_64.tar

      and tried to use CONNECT engine via their ODBC driver to work with Informix table:

      create table t1(id int, c1 int);

      I'll skip installation details, odbs.ini and odbcinst.ini etc for now (available at request). Everything works until I try to create a table without providing columns:

      MariaDB [test]> create table informix_t3(id int, c1 int) engine=connect table_type=ODBC tabname='t1' dbname='test' connection='dsn=inf';
      Query OK, 0 rows affected (0,06 sec)
       
      MariaDB [test]> select * from informix_t3;
      +------+------+
      | id   | c1   |
      +------+------+
      |    1 |    2 |
      +------+------+
      1 row in set (0,03 sec)
       
      MariaDB [test]> select version();
      +-----------------+
      | version()       |
      +-----------------+
      | 10.2.19-MariaDB |
      +-----------------+
      1 row in set (0,00 sec)
       
      MariaDB [test]> create table informix_t11 engine=connect table_type=ODBC tabname='T1' dbschema='TEST' connection='dsn=inf';
      ERROR 2013 (HY000): Lost connection to MySQL server during query
      MariaDB [test]>
      

      In gdb I see the following backtrace:

      (gdb) c
      Continuing.
      [New Thread 0x7f833d3f6700 (LWP 20265)]
       
      Program received signal SIGSEGV, Segmentation fault.
      [Switching to Thread 0x7f833d3f6700 (LWP 20265)]
      __strncpy_ssse3 () at ../sysdeps/x86_64/multiarch/strcpy-ssse3.S:2743
      2743    ../sysdeps/x86_64/multiarch/strcpy-ssse3.S: No such file or directory.
      (gdb) bt
      #0  __strncpy_ssse3 () at ../sysdeps/x86_64/multiarch/strcpy-ssse3.S:2743
      #1  0x00007f833e47d02b in strncpy (__len=18446744073709551615,
          __src=<optimized out>, __dest=<optimized out>)
          at /usr/include/x86_64-linux-gnu/bits/string3.h:120
      #2  TYPVAL<char*>::SetValue_char (this=0x7f82d011dc70, cp=<optimized out>,
          n=-1) at /home/openxs/git/server/storage/connect/value.cpp:1384
      #3  0x00007f833e4a5d5a in ODBConn::GetCatInfo (this=this@entry=0x7f82cffff048,
          cap=0x7f82d00baf08)
          at /home/openxs/git/server/storage/connect/odbconn.cpp:2441
      #4  0x00007f833e4a6cc4 in ODBCColumns (g=g@entry=0x7f82d403b610,
          dsn=dsn@entry=0x7f82cffff018 "dsn=inf", db=db@entry=0x0,
          table=table@entry=0x7f82d4039578 "", colpat=colpat@entry=0x0,
          maxres=<optimized out>, maxres@entry=0, info=false,
          sop=sop@entry=0x7f82cffff020)
          at /home/openxs/git/server/storage/connect/odbconn.cpp:406
      #5  0x00007f833e41ddfd in connect_assisted_discovery (thd=0x7f82d4016738,
          table_s=0x7f833d3f3250, create_info=0x7f833d3f3d80)
          at /home/openxs/git/server/storage/connect/ha_connect.cc:5781
      #6  0x00007f83432bc2c8 in create_table_impl (thd=thd@entry=0x7f82d4016738,
          orig_db=orig_db@entry=0x7f82d40204a0 "",
          orig_table_name=orig_table_name@entry=0x7f82d401fe48 "",
          db=db@entry=0x7f82d40204a0 "",
          table_name=table_name@entry=0x7f82d401fe48 "",
          path=path@entry=0x7f833d3f3920 "./test/informix_t1", options=...,
          create_info=create_info@entry=0x7f833d3f3d80,
          alter_info=alter_info@entry=0x7f833d3f3cd0,
          create_table_mode=create_table_mode@entry=-3,
          is_trans=is_trans@entry=0x7f833d3f3b9f,
          key_info=key_info@entry=0x7f833d3f3908,
          key_count=key_count@entry=0x7f833d3f3904, frm=frm@entry=0x7f833d3f3910)
          at /home/openxs/git/server/sql/sql_table.cc:4875
      #7  0x00007f83432bcb4a in mysql_create_table_no_lock (
          thd=thd@entry=0x7f82d4016738, db=db@entry=0x7f82d40204a0 "",
          table_name=table_name@entry=0x7f82d401fe48 "",
          create_info=create_info@entry=0x7f833d3f3d80,
          alter_info=alter_info@entry=0x7f833d3f3cd0,
          is_trans=is_trans@entry=0x7f833d3f3b9f, create_table_mode=-3)
          at /home/openxs/git/server/sql/sql_table.cc:5019
      #8  0x00007f83432bcccf in mysql_create_table (thd=thd@entry=0x7f82d4016738,
          create_table=create_table@entry=0x7f82d401fe90,
          create_info=create_info@entry=0x7f833d3f3d80,
          alter_info=alter_info@entry=0x7f833d3f3cd0)
          at /home/openxs/git/server/sql/sql_table.cc:5082
      #9  0x00007f8343242c2d in mysql_execute_command (thd=thd@entry=0x7f82d4016738)
          at /home/openxs/git/server/sql/sql_parse.cc:3988
      #10 0x00007f834324395f in mysql_parse (thd=0x7f82d4016738,
          rawbuf=<optimized out>, length=<optimized out>,
          parser_state=0x7f833d3f5260, is_com_multi=<optimized out>,
          is_next_command=<optimized out>)
          at /home/openxs/git/server/sql/sql_parse.cc:8011
      #11 0x00007f8343246aa6 in dispatch_command (command=command@entry=COM_QUERY,
          thd=thd@entry=0x7f82d4016738, packet=packet@entry=0x7f82d400a2f9 "",
          packet_length=packet_length@entry=105,
          is_com_multi=is_com_multi@entry=false,
          is_next_command=is_next_command@entry=false)
          at /home/openxs/git/server/sql/sql_parse.cc:1824
      #12 0x00007f8343247418 in do_command (thd=0x7f82d4016738)
          at /home/openxs/git/server/sql/sql_parse.cc:1378
      #13 0x00007f83433029cc in do_handle_one_connection (
          connect=connect@entry=0x7f83468f7b08)
          at /home/openxs/git/server/sql/sql_connect.cc:1335
      #14 0x00007f8343302ae4 in handle_one_connection (arg=0x7f83468f7b08)
          at /home/openxs/git/server/sql/sql_connect.cc:1241
      #15 0x00007f834126e184 in start_thread (arg=0x7f833d3f6700)
          at pthread_create.c:312
      #16 0x00007f834077b03d in clone ()
          at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      I think this is somewhat similar to MDEV-9414, but with other ODBC driver and database used.

      Attachments

        Activity

          People

            bertrandop Olivier Bertrand
            valerii Valerii Kravchuk
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.