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

CONNECT engine table_type=JDBC backtick enclosed table name produces error

    XMLWordPrintable

Details

    Description

      In the following statements, any table that begins with rmt_ is a CONNECT table using JDBC table_type accessing a remote MySQL server v5.6.

      This statement runs correctly:

      delete from rmt_Clients where `Client_ID` = '5001'
      

      However this statement:

      delete from `rmt_Clients` where `Client_ID` = '5001'
      

      produces this error:

      Error Code: 1296. Got error 122 'ExecuteUpdate: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to u' from CONNECT
      

      Also very similar behavior with UPDATE statements... if you back tick the table name or a column name in the SET clause it produces the same error as above. Using back tick to enclose a column name in the WHERE clause does work.

      Works:

      UPDATE rmt_Clients SET Name = 'Sally' where `Client_ID` = '5000'
      

      Does not work:

      UPDATE `rmt_Clients` SET `Name` = 'Sally' where `Client_ID` = '5000'
      

      produces error:

      Error Code: 1296. Got error 122 'ExecuteUpdate: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to u' from CONNECT
      

      Attachments

        Activity

          People

            bertrandop Olivier Bertrand
            rdyas Robert Dyas
            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.