mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 12:09:30 +02:00
fcl-db: bufdataset: fix for AV in test TTestCursorDBBasics.TestBookmarkValid
git-svn-id: trunk@39019 -
This commit is contained in:
parent
f5efe4bd90
commit
7fc9871cbe
@ -64,8 +64,6 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TCustomBufDataset }
|
|
||||||
|
|
||||||
PBufRecLinkItem = ^TBufRecLinkItem;
|
PBufRecLinkItem = ^TBufRecLinkItem;
|
||||||
TBufRecLinkItem = record
|
TBufRecLinkItem = record
|
||||||
prior : PBufRecLinkItem;
|
prior : PBufRecLinkItem;
|
||||||
@ -442,8 +440,7 @@ type
|
|||||||
class function RecognizeStream(AStream : TStream) : boolean; override;
|
class function RecognizeStream(AStream : TStream) : boolean; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TBufDatasetIndex }
|
{ TCustomBufDataset }
|
||||||
|
|
||||||
|
|
||||||
TCustomBufDataset = class(TDBDataSet)
|
TCustomBufDataset = class(TDBDataSet)
|
||||||
Private
|
Private
|
||||||
@ -477,7 +474,6 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ TBufDatasetIndexDefs }
|
{ TBufDatasetIndexDefs }
|
||||||
|
|
||||||
TBufDatasetIndexDefs = Class(TIndexDefs)
|
TBufDatasetIndexDefs = Class(TIndexDefs)
|
||||||
private
|
private
|
||||||
function GetBufDatasetIndex(AIndex : Integer): TBufDatasetIndex;
|
function GetBufDatasetIndex(AIndex : Integer): TBufDatasetIndex;
|
||||||
@ -489,6 +485,7 @@ type
|
|||||||
Property BufIndexdefs [AIndex : Integer] : TBufDatasetIndex Read GetBufDatasetIndex;
|
Property BufIndexdefs [AIndex : Integer] : TBufDatasetIndex Read GetBufDatasetIndex;
|
||||||
Property BufIndexes [AIndex : Integer] : TBufIndex Read GetBufferIndex;
|
Property BufIndexes [AIndex : Integer] : TBufIndex Read GetBufferIndex;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure BuildCustomIndex;
|
procedure BuildCustomIndex;
|
||||||
function GetBufIndex(Aindex : Integer): TBufIndex;
|
function GetBufIndex(Aindex : Integer): TBufIndex;
|
||||||
function GetBufIndexDef(Aindex : Integer): TBufDatasetIndex;
|
function GetBufIndexDef(Aindex : Integer): TBufDatasetIndex;
|
||||||
@ -526,6 +523,7 @@ type
|
|||||||
FUpdateBlobBuffers: array of PBlobBuffer;
|
FUpdateBlobBuffers: array of PBlobBuffer;
|
||||||
FManualMergeChangeLog : Boolean;
|
FManualMergeChangeLog : Boolean;
|
||||||
FRefreshing : Boolean;
|
FRefreshing : Boolean;
|
||||||
|
|
||||||
procedure ProcessFieldsToCompareStruct(const AFields, ADescFields, ACInsFields: TList;
|
procedure ProcessFieldsToCompareStruct(const AFields, ADescFields, ACInsFields: TList;
|
||||||
const AIndexOptions: TIndexOptions; const ALocateOptions: TLocateOptions; out ACompareStruct: TDBCompareStruct);
|
const AIndexOptions: TIndexOptions; const ALocateOptions: TLocateOptions; out ACompareStruct: TDBCompareStruct);
|
||||||
function BufferOffset: integer;
|
function BufferOffset: integer;
|
||||||
@ -3503,7 +3501,7 @@ end;
|
|||||||
|
|
||||||
function TCustomBufDataset.BookmarkValid(ABookmark: TBookmark): Boolean;
|
function TCustomBufDataset.BookmarkValid(ABookmark: TBookmark): Boolean;
|
||||||
begin
|
begin
|
||||||
Result:=Assigned(CurrentIndexDef) and CurrentIndexBuf.BookmarkValid(pointer(ABookmark));
|
Result:=Assigned(CurrentIndexBuf) and CurrentIndexBuf.BookmarkValid(pointer(ABookmark));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomBufDataset.CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Longint;
|
function TCustomBufDataset.CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Longint;
|
||||||
|
Loading…
Reference in New Issue
Block a user