8.4.1: RecordCount is 1 if PageSize not correct
Posted: Wed 10 Mar 2021 14:05
Hi,
there is a timing problem in unit PgSQLProtocolUni.
Since it is a timing problem, a test project is difficult to create. The problem does not occur on every computer.
there is a timing problem in unit PgSQLProtocolUni.
Code: Select all
function TPgSQLReadStream.HasData: boolean;
(....)
if FCurrentPosition < PageSize then
Result := True
else
Result := False; // in this case the record count will be set to 1 and stays 1 for ever
Code: Select all
procedure TPgSQLRecordSet.FetchBlock(Block: PBlockHeader; FetchBack: boolean; out RowsObtained: Integer);
(...)
Command.FReadStream.UseUnicode := Protocol.Net.UseUnicode;
if Command.FReadStream.HasData or not Command.FReadStream.IsLastRow then
RowsObtained := Command.FReadStream.FetchStmt(FFetchRows, Block, ReceiveFetchBuffer)
else
RowsObtained := 0;
(...)
end;