From: Guilhem Bichot Date: January 11 2011 11:15am Subject: Re: bzr commit into mysql-next-mr-bugfixing branch (jorgen.loland:3242) WL#4800 List-Archive: http://lists.mysql.com/commits/128410 Message-Id: <4D2C3BBF.6070600@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello, Jorgen Loland a écrit, Le 05.01.2011 14:26: > Guilhem, > > I think patching a broken diff-file has played a trick on you regarding > the questions below yes > (the comments I have removed are valid). yes I will give > commit another try so you can get a proper bundle. Thanks, will send a review of that latest patch. > On 01/04/2011 03:03 PM, Guilhem Bichot wrote: >> Hello, >> >> First, I'm grateful that you took the time to fix all issues; I see >> there were quite a few in my own code :-/ > ... >>> === modified file 'mysql-test/r/optimizer_trace_no_prot.result' >>> @@ -1561,12 +1688,12 @@ explain extended select * from t1 where }, >>> { >>> "attaching_conditions_to_tables": { >>> - "original_condition": null, >>> + "original_condition": "((`test`.`t1`.`s1` > (/* select#2 */ >>> select min(`test`.`t1`.`s2`) from `test`.`t1`)))", >> >> It's not obvious in this diff, but this block (like 1641 in the result >> file after the patch) belongs to select#2 (subquery) so it's not normal >> that its "original_condition" is now "(t1.s1>(select#2 etc": that >> is surely a condition for select#1. There is a problem. >> >>> "attached_conditions": [ >>> { >>> "database": "test", >>> "table": "t1", >>> - "attached": null >>> + "attached": "((`test`.`t1`.`s1` > (/* select#2 */ select >>> min(`test`.`t1`.`s2`) from `test`.`t1`)))" >>> } >>> ] /* attached_conditions */ >>> } /* attaching_conditions_to_tables */ >> >>> @@ -3436,12 +3647,12 @@ concat(c1,'y') IN >>> }, >>> { >>> "attaching_conditions_to_tables": { >>> - "original_condition": null, >>> + "original_condition": >>> "((concat(`test`.`t1`.`c1`,'x'),concat(`test`.`t1`.`c1`,'x') >>> >>> in (/* select#2 */ select left(`test`.`t2`.`c2`,8) from `test`.`t2`)) >>> and >>> (concat(`test`.`t1`.`c1`,'y'),concat(`test`.`t1`.`c1`,'y') >>> in (/* select#3 */ select left(`test`.`t2`.`c2`,9) from `test`.`t2`)))", >>> "attached_conditions": [ >>> { >>> "database": "test", >>> - "table": "t2", >>> - "attached": null >>> + "table": "t1", >> >> This change from t2 to t1 is not normal: this block (line 3651 of the >> result file after the patch) is for select#2 (subquery) which doesn't >> contain t1. >> >>> + "attached": >>> "((concat(`test`.`t1`.`c1`,'x'),concat(`test`.`t1`.`c1`,'x') >>> >>> in (/* select#2 */ select left(`test`.`t2`.`c2`,8) from `test`.`t2`)) >>> and >>> (concat(`test`.`t1`.`c1`,'y'),concat(`test`.`t1`.`c1`,'y') >>> in (/* select#3 */ select left(`test`.`t2`.`c2`,9) from `test`.`t2`)))" >>> } >>> ] /* attached_conditions */ >>> } /* attaching_conditions_to_tables */ >> >>> @@ -4150,13 +4473,117 @@ select * from t1 where (t1.a,t1.b) not i >>> "refine_plan": [ >>> { >>> "database": "test", >>> - "table": "t2", >>> + "table": "t1", >> >> not normal >> > -- Mr. Guilhem Bichot Oracle / MySQL / Optimizer team, Lead Software Engineer Bordeaux, France www.oracle.com / www.mysql.com