Fix TMySQLConnection.Ping in situations when FActive is already false, like a detected disconnect when hovering over server status panel. Most probably fixes what's described here: http://www.heidisql.com/forum.php?t=8499

This commit is contained in:
Ansgar Becker
2011-06-01 22:18:02 +00:00
parent 5571c5851a
commit 7e4daded87

View File

@@ -1233,7 +1233,7 @@ end;
function TMySQLConnection.Ping(Reconnect: Boolean): Boolean;
begin
Log(lcDebug, 'Ping server ...');
if FActive and ((FHandle=nil) or (mysql_ping(FHandle) <> 0)) then begin
if (FHandle=nil) or (mysql_ping(FHandle) <> 0) then begin
// Be sure to release some stuff before reconnecting
Active := False;
if Reconnect then