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

CONNECT engine JDBC error messages need more info

Details

    Description

      When something goes wrong with the execution of a CONNECT JDBC statement (typically a SELECT) the error message doesn't contain enough information. A typical error message would be as follows:

      Got error 174 'Cannot get result size rc=-1' from CONNECT)
      

      The remote database is likely returning a detailed error message, and this should be passed along into the connect error message... maybe something like:

      Got error 174 'Cannot get result size rc=-1 (Table Custumers does not exist)' from CONNECT)
      

      i.e. just nest the message. This is hopefully very easy by calling exception.getLocalizedMessage() on any exception thrown from JDBC and passing the returned text along in error messages.

      Attachments

        Activity

          Not sure this comes only from CONNECT. For instance:

          CREATE TABLE testerr (
          id INT NOT NULL,
          msg CHAR(32))
          ENGINE=CONNECT TABLE_TYPE=JDBC TABNAME=nonexist 
          CONNECTION='jdbc:mysql://localhost/test?user=root&useSSL=false';
          select * from testerr;
          

          Replies:

          1296: Got error 174 'ExecuteQuery:
          com.mysql.jdbcc4.MySQLSyntaxErrorException:
          Table 'test.nonexist' doesn't exist' from CONNECT
          

          CONNECT cannot do more than adding the message returned by the JDBC driver.

          bertrandop Olivier Bertrand added a comment - Not sure this comes only from CONNECT. For instance: CREATE TABLE testerr ( id INT NOT NULL, msg CHAR(32)) ENGINE=CONNECT TABLE_TYPE=JDBC TABNAME=nonexist CONNECTION='jdbc:mysql://localhost/test?user=root&useSSL=false'; select * from testerr; Replies: 1296: Got error 174 'ExecuteQuery: com.mysql.jdbcc4.MySQLSyntaxErrorException: Table 'test.nonexist' doesn't exist' from CONNECT CONNECT cannot do more than adding the message returned by the JDBC driver.

          People

            bertrandop Olivier Bertrand
            rdyas Robert Dyas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.