You are not logged in.
Pages: 1
Hi @ab, there is a small bug in SynDB.pas:
function TSQLDBConnectionPropertiesThreadSafe.CurrentThreadConnectionIndex: Integer;
var id: TThreadID;
tix: Int64;
conn: TSQLDBConnectionThreadSafe;
begin // caller made EnterCriticalSection(fConnectionCS)
if self<>nil then begin
...
result := 0;
-- while result<fConnectionPool.Count-1 do begin
++ while result<fConnectionPool.Count do begin
conn := TSQLDBConnectionThreadSafe(fConnectionPool.List[result]);
if conn.IsOutdated(tix) then // to guarantee reconnection
fConnectionPool.Delete(result) else begin
if conn.fThreadID=id then begin
fLatestConnectionRetrievedInPool := result;
exit;
end;
inc(result);
end;
end;
end;
result := -1;
end;
Just remove the -1 (minus one).
Thanks.
Esteban
Offline
FIxed by https://synopse.info/fossil/info/30a48e5b16
Thanks for the feedback!
Offline
Pages: 1