Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TFDTable Bug with DESC index?



Permlink Replies: 4 - Last Post: Jul 11, 2014 5:04 AM Last Post By: Dmitry Arefiev
Robert Holler

Posts: 6
Registered: 5/26/98
TFDTable Bug with DESC index?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 8, 2014 5:59 AM
when using TFDTable with an desc index an skipping "behind" the last rec (with .Next) on before the first (with .Prior) I get either phantom records when
LiveWindowFastFirst := False
or kind of key vilol exception when
LiveWindowFastFirst := True

Using XE6 Update1 and Firebird V2.5

Problem seems to be the wrongly generated SELECT queries, which leads to fetching wrong records.
Mus be > and not < and vv..

Also note the strange ORDER BY A.ID DESC, A.ID DESC in the 2. query


IndexFieldNames := 'ID:D';

Query for Prior
<< Open [Command="SELECT A.*, A.RDB$DB_KEY AS FD__DB_KEY FROM "CALLER" A
WHERE (((A.ID = :FD__WN_ID) AND (A.ID < :FD__WN_ID OR A.ID IS NULL)) OR ((A.ID < :FD__WN_ID OR A.ID IS NULL)))
ORDER BY A.ID ASC, A.ID ASC
{LIMIT(100)}
"]

Query for Next
<< Open [Command="SELECT A.*, A.RDB$DB_KEY AS FD__DB_KEY FROM "CALLER" A
WHERE (((A.ID = :FD__WN_ID) AND (A.ID > :FD__WN_ID)) OR ((A.ID > :FD__WN_ID)))
ORDER BY A.ID DESC, A.ID DESC
{LIMIT(100)}
"]

Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: TFDTable Bug with DESC index?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 8, 2014 11:38 AM   in response to: Robert Holler in response to: Robert Holler
Problem seems to be the wrongly generated SELECT queries, which leads to fetching wrong records.
Mus be > and not < and vv..

Also note the strange ORDER BY A.ID DESC, A.ID DESC in the 2. query

Both are known issues and already were fixed.

--
With best regards,
Dmitry Arefiev / FireDAC Architect
Eivind Bakkestuen


Posts: 447
Registered: 5/8/01
Re: TFDTable Bug with DESC index?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 9, 2014 4:53 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Both are known issues and already were fixed.

Fixed where? XE6 Update 1?

--
Eivind Bakkestuen [NDD]
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: TFDTable Bug with DESC index?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 11, 2014 5:04 AM   in response to: Eivind Bakkestuen in response to: Eivind Bakkestuen
Fixed where? XE6 Update 1?

In XE7 source base. Also I posted patch to "attachments" newsgroup.

--
With best regards,
Dmitry Arefiev / FireDAC Architect
Eivind Bakkestuen


Posts: 447
Registered: 5/8/01
Re: TFDTable Bug with DESC index?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 9, 2014 4:25 PM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Both are known issues and already were fixed.

Fixed where? XE6 Update 1?

--
Eivind Bakkestuen [NDD]
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02