Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-351

getTables call fails w/ syntax error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.5.2
    • 1.5.3
    • Other
    • None

    Description

      We installed the newest Connector/J 1.5.2 instead of 1.4.6. We discovered a bug in the new driver.
      getTables() call fails w/ syntax error. Failure occurs when using MariaDB JDBC driver V1.5.2 , but works when using MariaDB JDBC driver V1.4.6.

      call getTables()

          • SQLException caught ***

      SQLState: 42000
      Message: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
      Query is : SELECT TABLE_SCHEMA TABLE_CAT, NULL TABLE_SCHEM, TABLE_NAME, IF(TABLE_TYPE='BASE TABLE', 'TABLE', TABLE_TYPE) as TABLE_TYPE, TABLE_COMMENT REMARKS, NULL TYPE_CAT, NULL TYPE_SCHEM, NULL TYPE_NAME, NULL SELF_REFERENCING_COL_NAME, NULL REF_GENERATION FROM INFORMATION_SCHEMA.TABLES WHERE (ISNULL(database()) OR (TABLE_SCHEMA = database())) AND (TABLE_NAME = 'junk') ORDER BY TABLE_TYPE, TABLE_SCHEMA, TABLE_NAME
      Vendor: 1064

      When the above SQL statement is run in MariaDB natively, it returns a row with no problem.

      Attachments

        1. env_java
          0.4 kB
        2. repro.class
          3 kB
        3. repro.java
          5 kB
        4. repro.log.jdbcdriv146.java8
          0.3 kB
        5. repro.log.jdbcdriv152.java7
          0.9 kB
        6. repro.log.jdbcdriv152.java8
          0.9 kB

        Issue Links

          Activity

            People

              diego dupin Diego Dupin
              Gofman Yekaterina
              Votes:
              0 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.