On 2012-03-19 20:23, Thomas Mueller wrote:
Hi,

    Shouldn't sub-query results be independent of outer-queries? I
    understand the optimization and why it is useful - in some cases.
    However, when SET(@variable, value) is in the selectExpression,
    the order and number of rows SET(...) is applied to, are critical
    for correct results.


It depends on what you consider a 'correct' result. I agree it might be confusing if not all rows are read, but disabling optimizations depending on whether such features are used also seems to be wrong.

What about my example in https://groups.google.com/forum/?fromgroups#!topic/h2-database/haMFbcuewog? It's basically the same problem but with plain declarative SQL.

Cheers,
Stefan

--
Stefan Zeiger
Typesafe <http://typesafe.com> - The software stack for applications that scale
Twitter: @StefanZeiger <http://twitter.com/#%21/StefanZeiger>

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to