Hello everyone,
this is an old problem:
using the sqldb components to connect to the Firebird (TSQLConnector) if you connect the first time it's fine,
if you disconnect and then retry a connection you get the following error:
connection shutdownafter several searches the problem, in my opinion, is in the following piece of code in file
ibase60.inc:
Procedure ReleaseIBase60;
begin
if RefCount>1 then
Dec(RefCount)
else
begin
// Shutdown embedded subsystem with timeout 300ms (Firebird 2.5+)
// Required before unloading library; has no effect on non-embedded client
if (pointer(fb_shutdown)<>nil) and (fb_shutdown(300,1)<>0) then
begin
//todo: log error; still try to unload library below as the timeout may have been insufficient
end;
if UnloadLibrary(LibHandle) then
begin
Dec(RefCount);
LibHandle := NilHandle;
LoadedLibrary:='';
end;
end;
end;
calling fb_shutdown creates problems for non-embedded databases
Procedure ReleaseIBase60;
begin
if RefCount>1 then
Dec(RefCount)
else
begin
If UseEmbeddedFirebird then
begin
// Shutdown embedded subsystem with timeout 300ms (Firebird 2.5+)
// Required before unloading library; has no effect on non-embedded client
if (pointer(fb_shutdown)<>nil) and (fb_shutdown(300,1)<>0) then
begin
//todo: log error; still try to unload library below as the timeout may have been insufficient
end;
end;
if UnloadLibrary(LibHandle) then
begin
Dec(RefCount);
LibHandle := NilHandle;
LoadedLibrary:='';
end;
end;
end;
if this is a correct consideration, how do you communicate the patch to the free pascal development team?