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

MariaDB server crashes with CONNECT engine ODBC and MySQL driver

    XMLWordPrintable

Details

    Description

      MariaDB server crashes when I select from a CONNECT table of type ODBC that uses the MySQL 5.3 ODBC connector. Note that I CAN select from a CONNECT table that uses ODBC and FreeTDS driver, and that both the FreeTDS driver and MySQL driver work fine in isql. For example, the following works without any problem:

      isql -v MySQL root mypass

      This is with a clean install of CentOS 7 Google Compute Engine, as follows:

      sudo yum install unixODBC
       
      # MariaDB 10.1 CentOS repository
      sudo tee /etc/yum.repos.d/MariaDB.repo > /dev/null <<EOF
      [mariadb]
      name = MariaDB
      baseurl = http://yum.mariadb.org/10.1/centos7-amd64
      gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
      gpgcheck=1
      EOF
       
      # install MariaDB
      sudo yum install MariaDB-server MariaDB-client 
      sudo yum install MariaDB-connect-engine
       
      # configure SELinux to allow outgoing connection form mysqld to allow CONNECT to work
      sudo setsebool -P mysql_connect_any 1
       
      # start mysql or reboot
      sudo service mysql start
       
      mysql --user=root --execute="INSTALL SONAME 'ha_connect';"
       
      # install MySQL ODBC 5.3 - do NOT use 5.2 (default of CentOS7) because 5.2 gives segmentation fault!
      sudo yum install https://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.4-1.el6.x86_64.rpm
       
      # create /etc/odbc.ini
      sudo tee /etc/odbc.ini > /dev/null <<EOF
      [MySQL]
      driver = MySQL ODBC 5.3 Unicode Driver
      server = 173.194.251.85
      port = 3306
      database = test
      uid = 
      pwd = 
      EOF
       
      # test MySQL ODBC connection ***NO ISSUES HERE, seems to work great***
      isql -v MySQL root mypass
       
      # try to get list of tables - this command completes no problem
      CREATE OR REPLACE TABLE my_tables ENGINE=CONNECT TABLE_TYPE=ODBC CATFUNC=TABLES CONNECTION='dsn=MySQL;uid=root;pwd=mypass;';
       
      # try to query it and it HANGS (never returns)
      select * from my_tables;
       
      # take a look (upload file)
      cat /var/log/messages | grep mysql > ~/log.txt
       
      # DISABLE selinux and reboot
      sudo nano /etc/sysconfig/selinux
      # check it as follows after reboot (shows as disabled)
      sestatus
      # this made no difference
       

      Please let me know what else you need!

      Attachments

        Issue Links

          Activity

            People

              bertrandop Olivier Bertrand
              rdyas Robert Dyas
              Votes:
              2 Vote for this issue
              Watchers:
              6 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.