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

stmt.getMoreResults() returns true when it should return false

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.1.2
    • 2.2.0, 1.7.0
    • test
    • Windows running MariaDB 10.2 using mariadb-java-client-2.1.2.jar

    Description

      Calling stmt.getMoreResults() returns true but then subsequently calling stmt.getResultSet() returns null. This is a problem when handing all the resultSets from a stored procedure call that uses select a number of times. Perhaps the number of selects done by the stored procedure might vary from call to call depending on the data so you really want to iterate over them to get them all.
      This bug can be demonstrated by adding assertFalse(stmt.getMoreResults()); to the ends of the procedures stmtMultiResultSets() and prepareStmtMultiResultSets() in src/test/java/org/mariadb/jdbc/CallStatementTest.java
      If you add these two lines then the test fails where it should succeed. I have submitted a pull request to update the test to do these additional checks.
      https://github.com/MariaDB/mariadb-connector-j/pull/116

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            rheylen Richard Heylen
            Votes:
            1 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.