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

Can't create table via CONNECT engine (Unsupported table type ODBC)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: 10.0.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      # cat /etc/issue
      CentOS release 6.4 (Final)
      Kernel \r on an \m

      Description

      Query: create table subscrib engine=CONNECT table_type=ODBC tabname='crm.subscrib' connection='DSN=crm_test'

      Error Code: 1105
      Unsupported table type ODBC

      1. rpm -q unixODBC
        unixODBC-2.2.14-12.el6_3.x86_64
      2. rpm -q MariaDB-connect-engine
        MariaDB-connect-engine-10.0.2-1.x86_64

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            bar Alexander Barkov added a comment -

            Yes, you should configure your SELinux to allow the user "mysql" and the process "mysqld"
            to open /usr/cachesys/bin/libcacheodbc.so.

            Show
            bar Alexander Barkov added a comment - Yes, you should configure your SELinux to allow the user "mysql" and the process "mysqld" to open /usr/cachesys/bin/libcacheodbc.so.
            Hide
            bar Alexander Barkov added a comment -

            By the way, does this work on your box:

            sudo -u mysql isql Samplesunixodbc

            ?

            I.e. I'm curious what SELinux actually disallows:

            • the user "mysql"
            • or the process "mysqld"
            • or both.
            Show
            bar Alexander Barkov added a comment - By the way, does this work on your box: sudo -u mysql isql Samplesunixodbc ? I.e. I'm curious what SELinux actually disallows: the user "mysql" or the process "mysqld" or both.
            Hide
            mikhail Mikhail Gavrilov added a comment -
            1. isql -vvv crm_test
              ---------------------------------------
              Connected!
               
              sql-statement
              help [tablename]
              quit
               

              ---------------------------------------
              SQL> quit
              [root@crm-dev ~]# sudo -u mysql isql crm_test
              ---------------------------------------

              Connected!
               
              sql-statement
              help [tablename]
              quit
               

              ---------------------------------------
              SQL>

            SELinux not block process by user, SELinux uses file system labeling for block.
            https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/SELinux_Guide/rhlcommon-section-0068.html
            I think some labels or roles must be added for mysqld for correct work MariaDB and CONNECT engine under RHEL6.
            If you not have this problem under Fedora 18 with enabled SELinux, seems it already fixed bug of SELinux policy and must be reported to Red Hat for backporting to RHEL6.

            Show
            mikhail Mikhail Gavrilov added a comment - isql -vvv crm_test --------------------------------------- Connected!   sql-statement help [tablename] quit   --------------------------------------- SQL> quit [root@crm-dev ~] # sudo -u mysql isql crm_test --------------------------------------- Connected!   sql-statement help [tablename] quit   --------------------------------------- SQL> SELinux not block process by user, SELinux uses file system labeling for block. https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/SELinux_Guide/rhlcommon-section-0068.html I think some labels or roles must be added for mysqld for correct work MariaDB and CONNECT engine under RHEL6. If you not have this problem under Fedora 18 with enabled SELinux, seems it already fixed bug of SELinux policy and must be reported to Red Hat for backporting to RHEL6.
            Hide
            mathnode Richard Bensley added a comment -

            Binary tar does not include ODBC extensions for CONNECT:

            rbensley@lndwc-27-236:Downloads$ ldd mariadb-10.0.6-linux-x86_64/bin/mysqld
            linux-vdso.so.1 => (0x00007fffe31fe000)
            libpthread.so.0 => /lib64/libpthread.so.0 (0x00000033c3400000)
            libaio.so.1 => /lib64/libaio.so.1 (0x0000003ee1400000)
            librt.so.1 => /lib64/librt.so.1 (0x00000033c4400000)
            libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00000033d8400000)
            libdl.so.2 => /lib64/libdl.so.2 (0x00000033c3800000)
            libstdc+.so.6 => /lib64/libstdc+.so.6 (0x00000033d0000000)
            libm.so.6 => /lib64/libm.so.6 (0x00000033c4000000)
            libc.so.6 => /lib64/libc.so.6 (0x00000033c3000000)
            /lib64/ld-linux-x86-64.so.2 (0x00000033c2c00000)
            libfreebl3.so => /lib64/libfreebl3.so (0x00007f64c1b86000)
            libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00000033c5000000)

            This is the same for the glibc 2.14+ package.

            Show
            mathnode Richard Bensley added a comment - Binary tar does not include ODBC extensions for CONNECT: rbensley@lndwc-27-236:Downloads$ ldd mariadb-10.0.6-linux-x86_64/bin/mysqld linux-vdso.so.1 => (0x00007fffe31fe000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00000033c3400000) libaio.so.1 => /lib64/libaio.so.1 (0x0000003ee1400000) librt.so.1 => /lib64/librt.so.1 (0x00000033c4400000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00000033d8400000) libdl.so.2 => /lib64/libdl.so.2 (0x00000033c3800000) libstdc+ .so.6 => /lib64/libstdc +.so.6 (0x00000033d0000000) libm.so.6 => /lib64/libm.so.6 (0x00000033c4000000) libc.so.6 => /lib64/libc.so.6 (0x00000033c3000000) /lib64/ld-linux-x86-64.so.2 (0x00000033c2c00000) libfreebl3.so => /lib64/libfreebl3.so (0x00007f64c1b86000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00000033c5000000) This is the same for the glibc 2.14+ package.
            Hide
            bar Alexander Barkov added a comment -

            Richard,

            The binary for glibc-2.14+ does include ODBC support.
            You need to run "ldd ha_connect.so" instead of "ldd mysqld" to check this.

            Show
            bar Alexander Barkov added a comment - Richard, The binary for glibc-2.14+ does include ODBC support. You need to run "ldd ha_connect.so" instead of "ldd mysqld" to check this.

              People

              • Assignee:
                bertrandop Olivier Bertrand
                Reporter:
                mikhail Mikhail Gavrilov
              • Votes:
                1 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h