Bug #4808 MysqlPooledConnection.close() called twice causes NPE
| Submitted: | 29 Jul 2004 17:28 | Modified: | 29 Jul 2004 17:31 |
|---|---|---|---|
| Reporter: | Mark Matthews | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / J | Severity: | S2 (Serious) |
| Version: | 3.0.x, 3.1.x | OS: | NA |
| Assigned to: | Mark Matthews | CPU Architecture: | Any |
[29 Jul 2004 17:31]
Mark Matthews
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.
If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information
about accessing the source trees is available at
http://www.mysql.com/doc/en/Installing_source_tree.html
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.049 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: We recently got an NPE from MysqlPooledConnection.close(). public synchronized void close() throws SQLException { physicalConn.close(); physicalConn = null; } It appears the close() method is being called twice. I'm not yet sure what the cause of the NPE is, but I was wondering if this should throw an NPE. If so, would it be better to throw an SQLException instead of an NPE? We are currently using version 3.0.10 of mysql connector/j. How to repeat: MysqlConnectionPoolDataSource ds = new MysqlConnectionPoolDataSource(); ds.setURL(BaseTestCase.dbUrl); PooledConnection closeMeTwice = ds.getPooledConnection(); closeMeTwice.close(); closeMeTwice.close();