Bug #65640 There is no reconnection function in Connector/C++
Submitted: 16 Jun 2012 20:39 Modified: 27 Oct 2014 16:58
Reporter: sonly strong Email Updates:
Status: Closed Impact on me:
Category:Connector / C++ Severity:S1 (Critical)
Version: OS:Windows
Assigned to: CPU Architecture:Any

[16 Jun 2012 20:39] sonly strong
There is no reconnection function in Connector/C++.
My network is poor,so sometimes the connection is down, 
but cannot reconnect the server automatically

In Connector/C there is a function is:mysql_ping()
But in Connector/C++ does not, Always cause the program crash down.

pls pay attention to this, thanks.

How to repeat:
close the network connection
[17 Jun 2012 5:34] Valeriy Kravchuk
In Connector/J Connection class has ping() and isValid() methods, while I do not see anythings like this in Connector/C++. I'd say this is something to fix.
[22 Oct 2014 15:10] Hemant Dangi
Posted by developer:
Committed as rev#990.
Added Connection::isValid() which checks whether connection is alive, and 
Connection::reconnect() which reconnects if connection has died.
[27 Oct 2014 16:58] Paul DuBois
Noted in 1.1.5 changelog.

These functions were added: Connection::isValid() checks whether the
connection is alive, and Connection::reconnect() reconnects if the
connection has gone down.