Bug #65503 | ResultSets created by PreparedStatement.getGeneratedKeys() are not close()d. | ||
---|---|---|---|
Submitted: | 3 Jun 2012 19:17 | Modified: | 5 Sep 2012 18:03 |
Reporter: | Stefan M | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 5.1.20 | OS: | Any |
Assigned to: | Alexander Soklakov | CPU Architecture: | Any |
Tags: | ResultSet leak |
[3 Jun 2012 19:17]
Stefan M
[5 Jun 2012 17:38]
Sveta Smirnova
Thank you for the report. I can not repeat described behavior. Which versions of Connector/J and Java do you use?
[12 Jun 2012 11:58]
Stefan M
Testcase
Attachment: MysqlTest.java (application/octet-stream, text), 1.30 KiB.
[12 Jun 2012 12:00]
Stefan M
I'm running Windows 7 Ultimate, jdk1.6.0_23 and mysql-connector-java-5.1.20-bin.jar. I haven't tested if this occurs on jdk1.7 as well.
[12 Jun 2012 12:38]
Stefan M
I believe this can be reproduced with jdk1.7.0_04 (64bit) as well if you comment out the result.next() on line 27 of my previously uploaded testcase.
[13 Jun 2012 20:08]
Sveta Smirnova
Thank you for the test case. Verified as described. To get results quicker add option -Xmx10M
[5 Sep 2012 18:03]
John Russell
Added to changelog for 5.1.22: ResultSet objects created by the getGeneratedKeys() method were not being automatically closed, leading to potential memory leaks if the application did not explicitly close the ResultSet objects.