[fpc-pascal] Need help to fix a bug

JoshyFun joshyfun at gmail.com
Wed Jan 13 16:13:42 CET 2010

Hello FPC-Pascal,

I wish to fix this bug http://bugs.freepascal.org/view.php?id=15460
but I had found serious problems to understand how data is structured
in the TBufIndex and descendant classes, specially the

Can somebody help me ? From TBufDataset.BuildIndex I think that:

PBufRecLinkItem.Next points to next record.
PBufRecLinkItem.Prior points to previous record.

Maybe PBufRecLinkItem points to the dataset item data ?

Which is supossed to be pointed by:

(AIndex as TDoubleLinkedBufIndex).FFirstRecBuf
(AIndex as TDoubleLinkedBufIndex).FLastRecBuf

The first and last item in the dataset ?

Also which is the meaning of this line:

(AIndex as TDoubleLinkedBufIndex).FLastRecBuf[(AIndex as TDoubleLinkedBufIndex).IndNr].next:=(AIndex as TDoubleLinkedBufIndex).FFirstRecBuf;

I'm completly lost in this piece of code, and I really need it as my
SQL fetches could take around 1 minute and reorder data is a must. I
know I can reissue the query with a different order but this will take
around 20 seconds again while doing it in local memory is a breeze.

PS: To check changes in FPC I'm launching a complete build (without
clean) but this process will take 2 minutes anyway. Is there a faster
way to correctly build only the affected package (in this case fcl-db)

Best regards,

More information about the fpc-pascal mailing list