SQLdb: Cleaning up after server is gone away
Original Reporter info from Mantis: Michl @michl1
-
Reporter name: Michl
Original Reporter info from Mantis: Michl @michl1
- Reporter name: Michl
Description:
After the exception "Server is gone away" it is not possible, to deconnect and reconnect the connection, cause allways a rollback is attempted.
The same approach is possible in Zeos.
The attached patch fixes this.
Steps to reproduce:
Set the TimeOut in MySQL ver low (e.g. 2 seconds) and make after this two seconds something like:
try
MySQL56Connection1.Connected:=False;
MySQL56Connection1.Connected:=True;
except
on e: exception do begin
ShowMessage('TForm1.Button2Click.Fehler: '+e.Message);
MySQL56Connection1.Connected:=False;
// or
MySQL56Connection1.Free;
end;
end;
Always a Rollback is tryed, there is no way to resolve the exception.
Mantis conversion info:
- Mantis ID: 26505
- OS: 7
- OS Build: 64bit
- Build: 28239
- Platform: Windows
- Version: 2.7.1
- Fixed in version: 3.1.1
- Fixed in revision: 30627 (#3e100245)
- Target version: 3.0.0