mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Update server version panel also on reconnect. Fixes issue #1891.
This commit is contained in:
@@ -1574,7 +1574,6 @@ begin
|
||||
ActivateFileLogging;
|
||||
|
||||
tabHost.Caption := 'Host: '+Connection.Parameters.HostName;
|
||||
ShowStatusMsg('MySQL '+Connection.ServerVersionStr, 3);
|
||||
|
||||
// Save server version
|
||||
OpenRegistry(SessionName);
|
||||
@@ -4355,10 +4354,15 @@ end;
|
||||
|
||||
|
||||
procedure TMainForm.TimerConnectedTimer(Sender: TObject);
|
||||
var
|
||||
ConnectedTime: Integer;
|
||||
begin
|
||||
if Assigned(Connection) and Connection.Active then begin
|
||||
// calculate and display connection-time
|
||||
ShowStatusMsg('Connected: ' + FormatTimeNumber(Connection.ConnectionUptime), 2);
|
||||
// Calculate and display connection-time. Also, on any connect or reconnect, update server version panel.
|
||||
ConnectedTime := Connection.ConnectionUptime;
|
||||
ShowStatusMsg('Connected: ' + FormatTimeNumber(ConnectedTime), 2);
|
||||
if ConnectedTime < 10 then
|
||||
ShowStatusMsg('MySQL '+Connection.ServerVersionStr, 3);
|
||||
end else begin
|
||||
ShowStatusMsg('Disconnected.', 2);
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user