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

            People

            • Assignee:
              bertrandop Olivier Bertrand
              Reporter:
              rdyas Robert Dyas
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: