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

CONNECT table for mdb files

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Cannot Reproduce
    • 10.0.15
    • N/A
    • None
    • CentOS release 6.5 (X86_64)

    Description

      Like in the below manual,
      I want to make a CONNECT table which can read .mdb files.
      I am using mdbtools which is the only free software I know to make a ODBC connection to .mdb files.
      The CREATE TABLE command is going in an error at the moment.

      https://mariadb.com/kb/en/mariadb/connect-table-types-odbc-table-type-accessing-tables-from-other-dbms/

      Installing mdbtools

      Download from
      http://fossies.org/linux/privat/mdbtools-0.7.1.tar.gz/
       
      su root
      yum install gcc autoconf libtool automake flex bison glib2-devel txt2man
      tar zxf mdbtools-0.7.1.tar.gz
      cd mdbtools-0.7.1
      ./configure --with-unixodbc=/usr
      make
      make install
      vi /etc/odbc.ini
      ###
      [testmdb3]
      Description = db1
      Driver = /usr/local/lib/libmdbodbc.so
      Database = /opt/dmi/dmscore/rawdata/db1.mdb
      ###
       

      checking isql

      [root@kc1060 mysql]# isql testmdb3
      +---------------------------------------+
      | Connected!                            |
      |                                       |
      | sql-statement                         |
      | help [tablename]                      |
      | quit                                  |
      |                                       |
      +---------------------------------------+
      SQL> SELECT * FROM t_test
      +------------+-----------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+---------------------+
      | id         | name                                                                                                | place                                                                                               | register_date       |
      +------------+-----------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+---------------------+
      | 0          | Tom                                                                                                 | US                                                                                                  | 12/01/2014 12:00:00 |
      | 1          | Sara                                                                                                | France                                                                                              | 01/02/2015 12:00:00 |
      | 2          | Jef                                                                                                 | Poland                                                                                              | 01/15/2015 12:00:00 |
      +------------+-----------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+---------------------+
      SQLRowCount returns 3
      3 rows fetched

      making a CONNECT table

      [root@kc1060 mysql]# mysql -u root
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 2
      Server version: 10.0.15-MariaDB MariaDB Server
       
      Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.
       
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
       
      MariaDB [(none)]> use test;
      Reading table information for completion of table and column names
      You can turn off this feature to get a quicker startup with -A
       
      Database changed
      MariaDB [test]> CREATE OR REPLACE TABLE `mdb_t_test_2` engine=CONNECT table_type=ODBC tabname='t_test' connection='DSN=testmdb3';
      ERROR 2013 (HY000): Lost connection to MySQL server during query

      record in log file(/var/lib/mysql/servername.err)

      File not found
      Unable to locate database /opt/dmi/dmscore/rawdata/db1.mdb
      08003: [unixODBC][Driver Manager]Connnection does not exist, Native=0
      terminate called after throwing an instance of 'DBX*'
      CntCheckDB: dbuserp=0x7f8e864aa0c0
      cat=0x7f8e864102c0 oldhandler=(nil) newhandler=0x7f8e8646c620
      CntCheckDB: dbuserp=0x7f8e864aa0c0
      cat=0x7f8e864102c0 oldhandler=(nil) newhandler=0x7f8e8646e420
      CntCheckDB: dbuserp=0x7f8e864aa0c0
      cat=0x7f8e864102c0 oldhandler=(nil) newhandler=0x7f8e86470220
      CntCheckDB: dbuserp=0x7f8e864aa0c0
      cat=0x7f8e864102c0 oldhandler=(nil) newhandler=0x7f8e86472020
      CntCheckDB: dbuserp=0x7f8e864aa0c0
      cat=0x7f8e864102c0 oldhandler=(nil) newhandler=0x7f8e86473e20
      CntCheckDB: dbuserp=0x7f8e864aa0c0
      cat=0x7f8e864102c0 oldhandler=(nil) newhandler=0x7f8e86475c20
      CntCheckDB: dbuserp=0x7f8e864aa0c0
      cat=0x7f8e864102c0 oldhandler=(nil) newhandler=0x7f8e86477a20
      CntCheckDB: dbuserp=0x7f8e864aa0c0
      cat=0x7f8e864102c0 oldhandler=(nil) newhandler=0x7f8e86479820
      CntCheckDB: dbuserp=0x7f8e864aa0c0
      cat=0x7f8e864102c0 oldhandler=(nil) newhandler=0x7f8e8647b620
      CntCheckDB: dbuserp=0x7f8e864aa0c0
      cat=0x7f8e864102c0 oldhandler=(nil) newhandler=0x7f8e8647fc20
      150126 20:53:08 [ERROR] mysqld got signal 6 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see http://kb.askmonty.org/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
       
      Server version: 10.0.15-MariaDB
      key_buffer_size=4294967296
      read_buffer_size=1073741824
      max_used_connections=1
      max_threads=153
      thread_count=1
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 165882953 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x0x7f8e97eb2008
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7f90a953ed30 thread_stack 0x48000
      (my_addr_resolve failure: fork)
      /usr/sbin/mysqld(my_print_stacktrace+0x2b) [0xb70d4b]
      /usr/sbin/mysqld(handle_fatal_signal+0x398) [0x7257b8]
      /lib64/libpthread.so.0() [0x352620f710]
      /lib64/libc.so.6(gsignal+0x35) [0x3525e32625]
      /lib64/libc.so.6(abort+0x175) [0x3525e33e05]
      /usr/lib64/libstdc++.so.6(__gnu_cxx::__verbose_terminate_handler()+0x12d) [0x3530ebea7d]
      /usr/lib64/libstdc++.so.6() [0x3530ebcbd6]
      /usr/lib64/libstdc++.so.6() [0x3530ebcc03]
      /usr/lib64/libstdc++.so.6() [0x3530ebcd22]
      /usr/lib64/mysql/plugin/ha_connect.so(ODBConn::ThrowDBX(char*)+0) [0x7f8e981a9db0]
      /usr/lib64/mysql/plugin/ha_connect.so(ODBConn::VerifyConnect()+0x9c) [0x7f8e981aa18c]
      /usr/lib64/mysql/plugin/ha_connect.so(ODBConn::Open(char*, unsigned int)+0x3c) [0x7f8e981acfec]
      /usr/lib64/mysql/plugin/ha_connect.so(ODBCColumns(_global*, char*, char*, char*, char*, int, bool)+0x210) [0x7f8e981adac0]
      /usr/lib64/mysql/plugin/ha_connect.so(+0x767fb) [0x7f8e9813c7fb]
      /usr/sbin/mysqld() [0x6511e9]
      /usr/sbin/mysqld(mysql_create_table_no_lock(THD*, char const*, char const*, HA_CREATE_INFO*, Alter_info*, bool*, int)+0xef) [0x651a5f]
      /usr/sbin/mysqld(mysql_create_table(THD*, TABLE_LIST*, HA_CREATE_INFO*, Alter_info*)+0x11d) [0x651c9d]
      /usr/sbin/mysqld(mysql_execute_command(THD*)+0x5f5a) [0x5d711a]
      /usr/sbin/mysqld() [0x5d79d2]
      /usr/sbin/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x1b20) [0x5d9b90]
      /usr/sbin/mysqld(do_handle_one_connection(THD*)+0x453) [0x6956a3]
      /usr/sbin/mysqld(handle_one_connection+0x42) [0x695772]
      /lib64/libpthread.so.0() [0x35262079d1]
      /lib64/libc.so.6(clone+0x6d) [0x3525ee88fd]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f8e86491020): is an invalid pointer
      Connection ID (thread ID): 3
      Status: NOT_KILLED
       
      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on
       
      The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
      information that should help you find out what is causing the crash.

      Attachments

        Activity

          People

            bertrandop Olivier Bertrand
            takuya Takuya Aoki (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 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.