Bug #37179 Enable auto reconnect dont work in this version
Submitted: 4 Jun 2008 1:02 Modified: 5 Jan 2009 16:51
Reporter: Roberto Valente Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:5.1.4, 3.51 OS:Any
Assigned to: Jess Balint
Tags: enable auto reconnect
Triage: D2 (Serious)

[4 Jun 2008 1:02] Roberto Valente
Description:
The option Enable auto reconnect dont work in this version
I tested many applications at version 3.51 and when occurs 
connection fail, with, Enable auto reconnect, the connection
is restored.
Using connector 5.1, when connection fail, the connection canĀ“t be
restored, and the errors are the same as if the option
was not marked.

How to repeat:
Open any application using the 5.1 connector
(with Enable auto reconnect option marked)
Connect to Mysql Database
Disable the network connection
Restore the network connection
Try to access the database (ex: a query)

An exception will occuour as if the the 
Enable auto reconnect option was not marked.
[4 Jun 2008 16:56] Valeriy Kravchuk
Thank you for a problem report. What exact version, 5.1.x, do you use? 5.1.4 is the latest.
[4 Jun 2008 17:04] Roberto Valente
Hi
The ODBC version is the latest (5.1.4)

Thanks
[6 Jun 2008 22:49] Jess Balint
Verified by killing session while Access has connection open.
[6 Jun 2008 23:01] Jess Balint
Problem caused by adding #ifdefs in headers:

#ifdef MYSQL_OPT_RECONNECT /* disabled if not included in build header */
...
#endif /* MYSQL_OPT_RECONNECT */

Enum values from mysql.h not visible as cpp macros.
[18 Aug 2008 17:00] Jess Balint
Fix committed as rev 1141 and will be released in 3.51.27.
[5 Jan 2009 16:51] Tony Bedford
An entry was added to both the 3.51.27 and 5.1.6 changelogs:

The connection string option Enable Auto-reconnect did not work. When the connection failed, it could not be restored, and the errors generated were the same as if the option had not been selected.