1.2.139 : UNION ALL and nulls

79 views
Skip to first unread message

steve.ebersole

unread,
Jul 12, 2010, 12:07:50 PM7/12/10
to H2 Database
I have the following query:

select vehicle0_.id as id
from (
select id, vin, owner, 3 as clazz_ from SUV
union all
select id, vin, owner, 4 as clazz_ from Pickup
union all
select id, vin, owner, 1 as clazz_ from Car
union all
select id, vin, owner, 2 as clazz_ from Truck
) vehicle0_
where owner is null

Which returns no hits, even though each table has 1 row each with a
null owner. Querying the individual tables for a null owner returns
correct counts; and querying the UNION returns 4 rows each with a NULL
value for owner.

Does anybody have any idea what is going on there?

steve.ebersole

unread,
Jul 12, 2010, 12:48:27 PM7/12/10
to H2 Database

Thomas Mueller

unread,
Jul 13, 2010, 1:34:57 PM7/13/10
to h2-da...@googlegroups.com
Hi,

Thanks a lot for reporting this issue! It's a bug, it will be fixed in
the next release.

Regards,
Thomas

Thomas Mueller

unread,
Jul 26, 2010, 12:47:58 AM7/26/10
to h2-da...@googlegroups.com
Hi,

This problem should be fixed in version 1.2.140.

Regards,
Thomas

Reply all
Reply to author
Forward
0 new messages