2014-10-13 19:42 GMT+02:00 Alok Menghrajani <[email protected]>:

> On Fri, Oct 10, 2014 at 6:42 AM, Lukas Eder <[email protected]> wrote:
>
>> Hi Alok,
>>
>> This is now implemented on GitHub master for jOOQ 3.5.0. The change for
>> #3579 fixed a couple of issues for MySQL (and other databases), which have
>> trouble with more standard renderings of UNIONs and other set operations.
>> If you could provide some feedback, that would be greatly appreciated.
>>
>
> It's better in some ways (the result is now a valid mysql query), but I'm
> not sure the query matches what the programmer expects.
>
> 3.4.2 returns an invalid query:
> select * from jooqtest2 where name = ? order by ts asc limit ? offset ?
> union all select * from jooqtest2 where name = ? order by ts asc limit ?
> offset ?
>
> 3.5.0 now returns a valid query. The limit is applied at the end (after
> the union all), the result can only ever be a single row.
> select * from jooqtest2 where name = ? union all select * from (select *
> from jooqtest2 where name = ? order by ts asc limit ?) x order by ts asc
> limit ?
>
>
> I would expect the code to return two rows when each select matches:
> (select * from jooqtest2 where name = ? order by ts asc limit ?) union all
> (select * from jooqtest2 where name = ? order by ts asc limit ?)
>

You're right of course - I'm sorry, I must have misunderstood a previous
E-Mail. Yes, I can reproduce this behaviour.

Will investigate the options and keep you posted.

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to