mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 02:49:21 +02:00
* Merging revisions r43038 from trunk:
------------------------------------------------------------------------ r43038 | michael | 2019-09-19 10:39:35 +0200 (Thu, 19 Sep 2019) | 1 line Call CurrentIndexBuf only once ------------------------------------------------------------------------ git-svn-id: branches/fixes_3_2@43763 -
This commit is contained in:
parent
40d9899d65
commit
a00ee7af19
@ -2173,7 +2173,12 @@ begin
|
|||||||
FD:=InternalAddIndex(SDefaultIndex,'',[],'','');
|
FD:=InternalAddIndex(SDefaultIndex,'',[],'','');
|
||||||
FD.IndexType:=itDefault;
|
FD.IndexType:=itDefault;
|
||||||
FD.FDiscardOnClose:=True;
|
FD.FDiscardOnClose:=True;
|
||||||
end;
|
end
|
||||||
|
// Not sure about this. For the moment we leave it in comment
|
||||||
|
{ else if FD.BufferIndex=Nil then
|
||||||
|
InternalCreateIndex(FD)}
|
||||||
|
;
|
||||||
|
|
||||||
FCurrentIndexDef:=FD;
|
FCurrentIndexDef:=FD;
|
||||||
// Custom index
|
// Custom index
|
||||||
if not IsUniDirectional then
|
if not IsUniDirectional then
|
||||||
@ -2184,7 +2189,11 @@ begin
|
|||||||
FC:=InternalAddIndex(SCustomIndex,'',[],'','');
|
FC:=InternalAddIndex(SCustomIndex,'',[],'','');
|
||||||
FC.IndexType:=itCustom;
|
FC.IndexType:=itCustom;
|
||||||
FC.FDiscardOnClose:=True;
|
FC.FDiscardOnClose:=True;
|
||||||
end;
|
end
|
||||||
|
// Not sure about this. For the moment we leave it in comment
|
||||||
|
{ else if FD.BufferIndex=Nil then
|
||||||
|
InternalCreateIndex(FD)}
|
||||||
|
;
|
||||||
end;
|
end;
|
||||||
BookmarkSize:=CurrentIndexBuf.BookmarkSize;
|
BookmarkSize:=CurrentIndexBuf.BookmarkSize;
|
||||||
end;
|
end;
|
||||||
@ -2405,6 +2414,7 @@ function TCustomBufDataset.getnextpacket : integer;
|
|||||||
|
|
||||||
var i : integer;
|
var i : integer;
|
||||||
pb : TRecordBuffer;
|
pb : TRecordBuffer;
|
||||||
|
T : TBufIndex;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if FAllPacketsFetched then
|
if FAllPacketsFetched then
|
||||||
@ -2412,8 +2422,8 @@ begin
|
|||||||
result := 0;
|
result := 0;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
T:=CurrentIndexBuf;
|
||||||
CurrentIndexBuf.BeginUpdate;
|
T.BeginUpdate;
|
||||||
|
|
||||||
i := 0;
|
i := 0;
|
||||||
pb := DefaultBufferIndex.SpareBuffer;
|
pb := DefaultBufferIndex.SpareBuffer;
|
||||||
@ -2427,7 +2437,7 @@ begin
|
|||||||
inc(i);
|
inc(i);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
CurrentIndexBuf.EndUpdate;
|
T.EndUpdate;
|
||||||
FBRecordCount := FBRecordCount + i;
|
FBRecordCount := FBRecordCount + i;
|
||||||
result := i;
|
result := i;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user