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

CONNECT Engine table_type=JDBC CATFUNC=TABLES w/Microsoft JDBC driver not working

Details

    Description

      When using CONNECT engine with table_type=JDBC and CATFUNC=TABLES and the official Microsoft JDBC driver (latest v6 for jre 8 environment) the list of tables comes back (there are multiple rows) but all the table names are blank.

      The test case:

      CREATE OR REPLACE TABLE parasql_connect_tables
      ENGINE=CONNECT 
      TABLE_TYPE=JDBC 
      CATFUNC=TABLES  
      CONNECTION='jdbc:sqlserver://parasqleu.database.windows.net:1433;databaseName=ParaSQL;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=15;' 
      OPTION_LIST='USER=parasqleu,PASSWORD=WillProvidePassInPrivateMessage,MEMORY=3,DRIVER=com.microsoft.sqlserver.jdbc.SQLServerDriver' 
      QUOTED=1  
       
      select * from  parasql_connect_tables
       
      [results below are tab separated, only Table_Type is not blank]
       
      Table_Cat	Table_Schema	Table_Name	Table_Type	Remark
      			                             TABLE	
      			                             TABLE	
      			                             TABLE	
      			                             VIEW	
      			                             VIEW	
      

      And similar for CATFUNC=COLUMNS if I manually specify a valid table on the remote server:

      CREATE OR REPLACE TABLE parasql_connect_columns 
      ENGINE=CONNECT 
      TABLE_TYPE=JDBC 
      CATFUNC=COLUMNS 
      TABNAME='customerNew'  
      CONNECTION='jdbc:sqlserver://parasqleu.database.windows.net:1433;databaseName=ParaSQL;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=15;' 
      OPTION_LIST='USER=parasqleu,PASSWORD=WillProvidePassInPrivateMessage,MEMORY=3' 
      QUOTED=1 
      

      select * from  parasql_connect_columns 
       
      [results below, Data_Type etc are filled in but the first 4 columns are not]
       
      Table_Cat	Table_Schema	Table_Name	Column_Name	Data_Type	Type_Name	Column_Size	Buffer_Length	Decimal_Digits	Radix	Nullable	Remarks
      				4		10	4	0	10	1	
      				12		30	30	0	0	1	
      				91		10	6	0	0	1	
      				93		23	16	3	0	1	
      
      

      The latest Microsoft JDBC driver can be downloaded here:
      https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774

      NOTE: To ease testing, I can provide the password for the above Microsoft server in a private message so you don't have to set up an environment to test.

      Thank you.

      Attachments

        Activity

          rdyas Robert Dyas added a comment -

          Just saw that this is not listed as fixed in the 10.2.7 Changelog.

          Strange... it looks like other CONNECT changes were included in 10.2.7 but not this one... any idea why not included?

          rdyas Robert Dyas added a comment - Just saw that this is not listed as fixed in the 10.2.7 Changelog. Strange... it looks like other CONNECT changes were included in 10.2.7 but not this one... any idea why not included?

          Sorry for this. Because of a merge mistake this fix didn't end up in 10.2.7, it'll only be in 10.2.8.

          serg Sergei Golubchik added a comment - Sorry for this. Because of a merge mistake this fix didn't end up in 10.2.7, it'll only be in 10.2.8.
          rdyas Robert Dyas added a comment -

          Is this now actually included in 10.1.26 ?
          It is not listed in the change log nor the release notes.

          rdyas Robert Dyas added a comment - Is this now actually included in 10.1.26 ? It is not listed in the change log nor the release notes.
          rdyas Robert Dyas added a comment -

          OK, initial testing of NVARCHAR is working, so I guess the changes were integrated just not listed in the change log. Pretty big change not to list!

          rdyas Robert Dyas added a comment - OK, initial testing of NVARCHAR is working, so I guess the changes were integrated just not listed in the change log. Pretty big change not to list!

          There has been a git problem in the change log that caused it to be lost. However hopefully all the recent fixes should be included.

          bertrandop Olivier Bertrand added a comment - There has been a git problem in the change log that caused it to be lost. However hopefully all the recent fixes should be included.

          People

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