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

feature request: CONNECT engine to support table_type=JDBC

Details

    Description

      Not sure where to place a feature request, so doing it here.
      Sorry in advance if its the wrong place.

      Having CONNECT engine support JDBC would open up a world of drivers for CONNECT, especially for Linux servers where ODBC drivers are not as plentiful as JDBC drivers.

      Implementation: adding support for JDBC seems like it would be pretty easy using the Java Native Interface (JNI) and the similarity between ODBC and JDBC core functionality.

      NOTE: This seems like it would also solve the problem (indirectly) of not being able to use the ODBC MySQL driver with CONNECT on Linux... the JDBC MySQL driver might serve the purpose.

      Attachments

        Activity

          rdyas Robert Dyas added a comment -

          connect is installed and works with ODBC
          but when i add those two variables to the my.cnf and restart the server, it won't restart.

          rdyas Robert Dyas added a comment - connect is installed and works with ODBC but when i add those two variables to the my.cnf and restart the server, it won't restart.

          If connect is installed, this is because that old version does not implement the connect_jvm_path variable. So you cannot use it, either in the my.cnf file nor by entering a SET command.

          Then, the only way to make it work is to export the environment variable LD_LIBRARY_PATH with the path to the jvm lib in it.

          Sorry about that.

          bertrandop Olivier Bertrand added a comment - If connect is installed, this is because that old version does not implement the connect_jvm_path variable. So you cannot use it, either in the my.cnf file nor by entering a SET command. Then, the only way to make it work is to export the environment variable LD_LIBRARY_PATH with the path to the jvm lib in it. Sorry about that.
          rdyas Robert Dyas added a comment -

          Yes, connect is installed and works with ODBC driver.
          This is what I am adding to my.cnf under the [msqld] section:

          connect_jvm_path=/opt/oracle/jdk1.8.0_101/jre/lib/amd64/server
          connect_class_path=/opt/oracle/jdk1.8.0_101/jre/lib/ext
          

          I assume that if the driver jar files are placed in .../jre/lib/ext then I don't need the connect_class_path... is that a correct assumption? Can it find the JdbcInterface jar itself? If not, where would it be located in the compiled/distro centos distribution directory hierarchy?

          I can wait until 10.1.17 to test if that is necessary.

          rdyas Robert Dyas added a comment - Yes, connect is installed and works with ODBC driver. This is what I am adding to my.cnf under the [msqld] section: connect_jvm_path=/opt/oracle/jdk1. 8 .0_101/jre/lib/amd64/server connect_class_path=/opt/oracle/jdk1. 8 .0_101/jre/lib/ext I assume that if the driver jar files are placed in .../jre/lib/ext then I don't need the connect_class_path... is that a correct assumption? Can it find the JdbcInterface jar itself? If not, where would it be located in the compiled/distro centos distribution directory hierarchy? I can wait until 10.1.17 to test if that is necessary.

          As I said in my last comment, you cannot use connect_jvm_path with 10.1.16.
          I think your second assumption is false because finding the jvm lib is a C++ job that looks into the LD_LIBRARY_PATH (or its defaut one) and finding jar files is a java job that look into the class path. Note that using the connect_class_path is a facility but you can also export the CLASS_PATH environment variable.
          These exports can be done in a script that would start the server.

          Normally, the 10.1.17 should install the JdbcInterface.jar file in the plugin directory.

          bertrandop Olivier Bertrand added a comment - As I said in my last comment, you cannot use connect_jvm_path with 10.1.16. I think your second assumption is false because finding the jvm lib is a C++ job that looks into the LD_LIBRARY_PATH (or its defaut one) and finding jar files is a java job that look into the class path. Note that using the connect_class_path is a facility but you can also export the CLASS_PATH environment variable. These exports can be done in a script that would start the server. Normally, the 10.1.17 should install the JdbcInterface.jar file in the plugin directory.

          MariaDB version 10.0.27 is available and contains the proper JDBC table support.

          bertrandop Olivier Bertrand added a comment - MariaDB version 10.0.27 is available and contains the proper JDBC table support.

          People

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