EOF does not work if TOraQuery contains clob fields

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ac
Posts: 32
Joined: Mon 16 Jan 2006 12:56

EOF does not work if TOraQuery contains clob fields

Post by ac » Fri 27 Jan 2006 15:45

Client version: Oracle 9.2.0.7
Server version: Oracle 9.2.0.7
Delphi version: 7
ODAC version: 5.70.0.28


Example:

dataset: TOraQuery;
SQL := 'select * from lotrec';

Code: Select all

dataset.First;
i := 0;
while not dataset.Eof do
begin
  Inc(i);
  dataset.Next;
end;
i < RecordCount after the loop finishes.

AFAICS this happens if the iterated table contains CLOB fields (but I didn't try with BLOB, XMLTYPE). Having only basic types integer, number, varchar2,... the example above works.

If executing the example above with the table below, RecordCount=30000 (which is correct) but i=4728 (it differs from run to run).

PL/SQL Script:

Code: Select all

create table lotrec (a integer not null primary key, b clob);

declare
  i integer;
begin
  for i in 1 .. 30000 loop
    insert into lotrec values (i, 'a');  
  end loop;  
end;

ac
Posts: 32
Joined: Mon 16 Jan 2006 12:56

Post by ac » Fri 27 Jan 2006 15:54

it doesn't work for queries containing XMLTYPE too.

ac
Posts: 32
Joined: Mon 16 Jan 2006 12:56

Post by ac » Tue 31 Jan 2006 11:31

hello guys,

I'm sorry to urge you with this bug, but we have a customer who cannot work with our application because of this bug. So we really need a fix. Can you please give me an update about the status? When will the bug be fixed? When will there be a new release build?

thanks a lot.

additional hint: we tried to use a workaround like

Code: Select all

dataset.First; 
lCount := dataset.RecordCount; 
for i := 0 to lCount - 1 do
begin 
  Inc(i); 
  dataset.Next; 
end;
but also this workaround does not work: let's say the dataset contains 1000 records and after 500 EOF returns false. Using this workaround causes dataset.Next to work correctly for the first 500 records, but for all other records dataset.next returns always the record 500.

ac
Posts: 32
Joined: Mon 16 Jan 2006 12:56

Post by ac » Tue 31 Jan 2006 12:30

hints:

- maybe my other post (version 5.70.0.28: ORA-21503: program terminated by fatal error) is a consecutive fault of this bug. I realized, that I get the error ORA-21503 after iterating through a table which contains XMLTYPE fields.

- it seems there is a big memory leak when iterating through tables containing XMLTYPE fields: I have a table with 2 columns (integer, XMLTYPE) where every record has "" as value for the XMLTYPE field. The dataset has 30000 records. After ~19000 records EOF returns false and the application needs 2GB RAM! (before the iteration the needed memory was just 50MB).

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Wed 01 Feb 2006 10:25

We have received your request. The investigation is in progress. Unfortunately now we can't provide any information.

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Mon 13 Nov 2006 12:59

This problem was fixed in ODAC 5.70.0.29.

Post Reply