Bug #118360 | A potential bugs in Mysql Connector/J | ||
---|---|---|---|
Submitted: | 4 Jun 14:50 | Modified: | 3 Jul 14:41 |
Reporter: | 策 吕 | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 9.0.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[4 Jun 14:50]
策 吕
[4 Jun 14:51]
MySQL Verification Team
Hello 策 吕, Thank you for the report and feedback. Verified as described. regards, Umesh
[4 Jun 14:54]
策 吕
As I am using stmt = con.createStatement(1005, 1008, ResultSet.CLOSE_CURSORS_AT_COMMIT); Therefore get stmt's should be resultSetHoldability should be ResultSet.CLOSE_CURSORS_AT_COMMIT, so System.out.println(con.getHoldability()) output is 2, System.out.println(stmt.getResultSetHoldability()) output should also be 2 (ResultSet.CLOSE_CURSORS_AT_COMMIT)
[3 Jul 14:40]
Axyoan Marcelo
Posted by developer: Hi 策 吕, Thank you for you report. The inconsistencies you mentioned are indeed a bug, and is being tracked by the following report: Bug#44791 As such, this report will be closed as a duplicate. Please note, that in your test case, you try to create a Statement with ResultSet.CLOSE_CURSORS_AT_COMMIT. Connector/J only supports ResultSet.HOLD_CURSORS_OVER_COMMIT, so even if you try to use a different resultSetHoldability, the driver won't apply these changes. However, doing this won't throw an exception unless the connection property `pedantic` is set to "true". Indeed, if you set the connection property "pedantic" to "true", you will get the following exception running your testcase: java.sql.SQLException: HOLD_CUSRORS_OVER_COMMIT is only supported holdability level. I hope this cleared up any confusion. Regards, Axyoan