db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Butterworth <da...@economicoutlook.net>
Subject Re: Possible bug with IN clause using Derby-10.3.2.1
Date Mon, 07 Apr 2008 04:12:16 GMT
Sure,

For anyone interested, the following select statements demonstrate the inconsistencies I described
earlier in this thread.
I've also attached the database that these statements were run against.

ij> SELECT account.admin_unit_id, booking.booking_date_time_in, booking.booking_date_time_out,
booking.child_id FROM spike.accounts account, spike.admin_units admin_unit, spike.bookings
booking WHERE booking.child_id = 2 AND admin_unit.admin_unit_id IN (1,21) AND booking.booking_date_time_out
>= 20080331000000 AND booking.booking_date_time_in <= 20080406235900 AND account.account_id
= booking.account_id AND admin_unit.admin_unit_id = account.admin_unit_id ORDER BY booking.booking_date_time_in
ASC;
ADMIN_UNIT&|BOOKING_DATE_TIME_IN|BOOKING_DATE_TIME_O&|CHILD_ID   
-----------------------------------------------------------------
1          |20080402083500      |20080402152959      |2          
1          |20080404083500      |20080404152959      |2          

2 rows selected
ij> SELECT account.admin_unit_id, booking.booking_date_time_in, booking.booking_date_time_out,
booking.child_id FROM spike.accounts account, spike.admin_units admin_unit, spike.bookings
booking WHERE booking.child_id = 2 AND account.admin_unit_id IN (1,21) AND booking.booking_date_time_out
>= 20080331000000 AND booking.booking_date_time_in <= 20080406235900 AND account.account_id
= booking.account_id AND admin_unit.admin_unit_id = account.admin_unit_id ORDER BY booking.booking_date_time_in
ASC;
ADMIN_UNIT&|BOOKING_DATE_TIME_IN|BOOKING_DATE_TIME_O&|CHILD_ID   
-----------------------------------------------------------------
1          |20080402083500      |20080402152959      |2          
1          |20080403083500      |20080403152959      |2          
1          |20080404083500      |20080404152959      |2          

3 rows selected

Regards
David

On Mon, 2008-04-07 at 07:26 -0700, Bryan Pendleton wrote:
> David Butterworth wrote:
> > Hi Bryan
> > 
> > Just confirming you received the test database I sent you.
> 
> Hi David, yes I did.
> 
> I'm not sure I'm going to have much time to work on this issue
> right away, though, so if there's anything more you can post
> to the mailing list in terms of helping people reproduce the
> problem that would probably help others to get involved.
> 
> thanks,
> 
> bryan
> 

Mime
View raw message