Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
2.1.2
-
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