From: Jorgen Loland Date: August 26 2010 11:19am Subject: Re: bzr commit into mysql-next-mr-bugfixing branch (jorgen.loland:3220) Bug#30597 List-Archive: http://lists.mysql.com/commits/116853 Message-Id: <4C764DDA.2070007@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit On 08/25/2010 11:45 AM, Guilhem Bichot wrote: > Hello, > > Jorgen Loland a écrit, Le 18.08.2010 11:01: >> #At file:///export/home/jl208045/mysql/mysql-next-mr-bugfixing-30597/ >> based on revid:joerg@stripped >> >> 3220 Jorgen Loland 2010-08-18 >> Bug#30597: Change EXPLAIN output to include extrema of UNION components > >> === modified file 'sql/sql_lex.h' >> --- a/sql/sql_lex.h 2010-08-16 18:21:24 +0000 >> +++ b/sql/sql_lex.h 2010-08-18 09:01:38 +0000 >> @@ -712,6 +712,13 @@ public: >> } >> st_select_lex* outer_select(); >> st_select_lex* next_select() { return (st_select_lex*) next; } >> + >> + inline st_select_lex* last_select() { > > you can declare this function "const", it doesn't change data. If this object does not have a next, we effectively return 'this', which is const inside a const function. But we don't want the return pointer to be const, so I don't think that it makes sense to do this. Simply changing to "inline st_select_lex* last_select() const {...}" gives compiler warning: sql/sql_lex.h:765: error: invalid conversion from ‘const st_select_lex* const’ to ‘st_select_lex*’ Ok to push without const, or do you have another idea? -- Jørgen Løland | Senior Software Engineer | +47 73842138 Oracle MySQL Trondheim, Norway