Bug #113326 | Statement.getResultSetType () seems failed to change the result set type | ||
---|---|---|---|
Submitted: | 5 Dec 2023 4:41 | Modified: | 29 Jul 6:46 |
Reporter: | Wenqian Deng | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 8.1.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[5 Dec 2023 4:41]
Wenqian Deng
[6 Dec 2023 7:21]
MySQL Verification Team
Hello Wenqian Deng, Thank you for the report and test case. Verified as described. regards, Umesh
[29 Jul 6:46]
Axyoan Marcelo
Posted by developer: The ResultSet obtained from getGeneratedKeys() is not like the usual ResultSets one would obtain from executing queries. It's implementation is driver specific, as stated in the specification. According to the JDBC 4.3 specification (section 13.6 “Retrieving Auto Generated Values”): ...“The type of the ResultSet object (returned from Statement.getGeneratedKeys()) must be either TYPE_FORWARD_ONLY or TYPE_SCROLL_INSENSITIVE.. Connector/J uses TYPE_SCROLL_INSENSITIVE when creating the generated‑keys ResultSet. This fully conforms to the spec. Similarly, the concurrency will always be CONCUR_READ_ONLY, as found in the specification (same section as above): "The concurrency of the ResultSet object returned by getGeneratedKeys must be CONCUR_READ_ONLY." Closing as not a bug.