db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Record not found in some SQL - Bug?
Date Wed, 28 Jan 2009 10:53:03 GMT
jrgchip <chip@datamology.com> writes:

> I have a "Product" table with a "Num" column that contains a record that is
> only accessible by some SQL and not others.  I have tested this by JDBC
> access from my Java app as well was from IJ directly.
>
> ij> select "Num", length("Num") as "Len" from app."Product" where "Num" like
> 'HG1549%';
> Num            |Len
> ----------------------------
> HG15490        |7
> HG15493        |7
> HG15497        |7   <== Found as expected
> HG15499        |7
> 4 rows selected
>
> ij> select "Num" from app."Product" where "Num" = 'HG15490';
> Num
> ----------------
> HG15490  <== Found as expected
> 1 row selected
>
> ij> select "Num" from app."Product" where "Num" = 'HG15493';
> Num
> ----------------
> HG15493  <== Found as expected
> 1 row selected
>
> ij> select "Num" from app."Product" where "Num" = 'HG15499';
> Num
> ----------------
> HG15499  <== Found as expected
> 1 row selected
>
> ij> select "Num" from app."Product" where "Num" = 'HG15497';
> Num
> ----------------
> 0 rows selected  <== Not found!!!
>
> What could possibly hide the 'HG15497' record from the last SELECT?

I don't know, but it definitely looks like a bug. Please file a bug
report at https://issues.apache.org/jira/browse/DERBY so that we can
track the problem. In the bug report, please include the CREATE TABLE
and CREATE INDEX statements used to create the Product table and its
indexes. Or even better, if possible, a script to reproduce the problem.

-- 
Knut Anders

Mime
View raw message