From: Tor Didriksen Date: May 20 2011 1:52pm Subject: Re: bzr commit into mysql-trunk branch (tor.didriksen:3309) WL#4800 List-Archive: http://lists.mysql.com/commits/137793 Message-Id: <4DD67229.9000705@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 2011-05-20 15:17, Guilhem Bichot wrote: >> === modified file 'sql/sql_array.h' >> --- a/sql/sql_array.h 2011-04-05 07:34:13 +0000 >> +++ b/sql/sql_array.h 2011-05-19 10:55:07 +0000 >> @@ -73,6 +73,7 @@ public: >> Pops the last element. The returned element must not be used >> after the >> next update to the array. >> */ >> + // This interface is still wrong!! > > Sure... but in what sense? well, you changed it, but didn't really fix it. a pop() should return void, in order to prevent misuse. your fix disallows writing into the returned element, but clients can still read it, even after something has been appended to the array. they will then be reading the newly pushed element, rather than what they popped. I'm guessing you changed it because you were *writing* into it ? -- didrik