Bug #17192 autoReconnect / autoReconnectForPools broken
Submitted: 7 Feb 2006 15:26 Modified: 1 Sep 2009 10:44
Reporter: Andre Timmer Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S4 (Feature request)
Version:mysql-connector-java-3.1.12-bin.jar OS:Any
Assigned to: CPU Architecture:Any

[7 Feb 2006 15:26] Andre Timmer
Description:
With mysql-connector-java-3.0.10-stable-bin.jar autoReconnect worked.
This is no longer the case with mysql-connector-java-3.1.12-bin.jar.

Even not with enables:
- enableDeprecatedAutoreconnect=true
- autoReconnect=true
- autoReconnectForPools=true

How to repeat:
.

Suggested fix:
It's mentioned in the release note that autoReconnect will no longer be supported.
As a developer it would be nice to have choice (and your implementation is more efficient then mine). 

Please restore this as a feature and include the following in the documentation?

http://bugs.mysql.com/bug.php?id=5020

If the argument is that there might be a transaction going, then a pretty simple
case can be made:
- If the connection is in autoCommit mode, it's safe to autoReconnect.
- If the connection is not in autoCommit mode, but there is no open transaction,
it's safe to autoReconnect (since the connection may be pooled).
- If the connection is not in autoCommit mode, and there is an open transaction,
then throw an exception.
[1 Sep 2009 10:44] Tonci Grgin
I believe this functionality is already added to c/J.