List:Commits« Previous MessageNext Message »
From:Jorgen Loland Date:November 25 2010 12:51pm
Subject:Re: bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3236)
WL#1393
View as plain text  
On 11/24/2010 04:36 PM, Tor Didriksen wrote:
> On 2010-11-19 12:59, Øystein Grøvlen wrote:
>> > +################
>> > +## Test with subqueries
>> > +SELECT d1.* FROM t1
>> > +LEFT JOIN (SELECT * FROM t1 LIMIT 30) d1 on t1.f1=d1.f1
>> > +ORDER BY d1.f2 DESC LIMIT 30;
>>
>> I do not think the result of the above query is well defined since the
>> contents of the derived table, d1, is not explicitly ordered.
>
> ???

Without ordering, "select * from t1 limit 30" will return the first 30 records 
it encounters, but the order depends on the access method. You then left join 
these 30 "random" records with t1. A different access method for t1 in the 
subquery may therefore change the result.

-- 
Jørgen Løland | Senior Software Engineer | +47 73842138
Oracle MySQL
Trondheim, Norway
Thread
bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3236) WL#1393Tor Didriksen11 Nov
  • Re: bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3236)WL#1393Øystein Grøvlen19 Nov
    • Re: bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3236)WL#1393Tor Didriksen24 Nov
      • Re: bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3236)WL#1393Jorgen Loland25 Nov
      • Re: bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3236)WL#1393Øystein Grøvlen26 Nov
        • Re: bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3236)WL#1393Tor Didriksen2 Dec
          • Re: bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3236)WL#1393Øystein Grøvlen2 Dec
            • Re: bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3236)WL#1393Øystein Grøvlen3 Dec