Bug #57380 supportsMultipleResultSets() always returns false
| Submitted: | 11 Oct 2010 18:04 | Modified: | 13 Oct 2010 11:27 |
|---|---|---|---|
| Reporter: | Todd Farmer (OCA) | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / J | Severity: | S3 (Non-critical) |
| Version: | 5.1.13 | OS: | Any |
| Assigned to: | Todd Farmer | CPU Architecture: | Any |
[11 Oct 2010 18:08]
Todd Farmer
Fixed in r983.
[13 Oct 2010 11:27]
Tony Bedford
An entry has been added to the 5.1.14 changelog: DatabaseMetaData.supportsMultipleResultSets() was hard-coded to return false, even though Connector/J supports multiple result sets.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: DatabaseMetaData.supportsMultipleResultSets() is hard-coded to return false, but C/J has long supported multiple result sets: System.out.println("supportsMultipleResultSets(): " + md.supportsMultipleResultSets()); conn.createStatement().execute("DROP PROCEDURE IF EXISTS testProc"); conn.createStatement().execute("CREATE PROCEDURE testProc() BEGIN SELECT NOW(); SELECT 1; SELECT 2; END"); Statement s = conn.createStatement(); s.execute("CALL testProc()"); do { ResultSet rs = s.getResultSet(); rs.next(); System.out.println("Result: " + rs.getString(1)); } while (s.getMoreResults()); ... supportsMultipleResultSets(): false Result: 2010-10-11 10:42:19.0 Result: 1 Result: 2 How to repeat: DatabaseMetaData.supportsMultipleResultSets() Suggested fix: Return true when server version is >= 4.1.