Closed GoogleCodeExporter closed 8 years ago
You are right, I will fix this in the next release. All other databases I
tested don't push the condition into the subquery.
Unfortunately, I don't currently know of a workaround for older versions of H2.
Original comment by thomas.t...@gmail.com
on 23 Mar 2012 at 3:37
Fixed in version 1.3.166
Original comment by thomas.t...@gmail.com
on 9 Apr 2012 at 10:24
Here's a more complicated query which still exhibits the same problem:
select s2.c3, s2.c5 from (select s3.c3 as c3, s3.c4 as c4, s3.c5 as c5 from
(select s4.c3 as c3, s4.c4 as c4, s4.c5 as c5 from (select e1."COF_NAME" as c3,
e1."PRICE" as c4, 42 as c5 from "COFFEES" e1) s4 order by s4.c3) s3 LIMIT 2) s2
where s2.c4 < 10
Original comment by szeig...@gmail.com
on 12 Jun 2012 at 2:37
Never mind, this version separates the ORDER BY from the LIMIT, so the ordering
does not apply (thanks to SQL's stupid non-compositional semantics).
Original comment by szeig...@gmail.com
on 12 Jun 2012 at 2:55
Original issue reported on code.google.com by
szeig...@gmail.com
on 22 Mar 2012 at 9:59