From: Tor Didriksen Date: February 11 2011 10:29am Subject: Re: bzr commit into mysql-5.5 branch (tor.didriksen:3323) Bug#60085 List-Archive: http://lists.mysql.com/commits/131116 Message-Id: <4D550F97.4070102@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit On 2011-02-11 11:10, Øystein Grøvlen wrote: > On 02/11/11 11:00 AM, Jorgen Loland wrote: >> >@@ -599,15 +604,17 @@ longlong Item_singlerow_subselect::val_i >> > >> > String *Item_singlerow_subselect::val_str(String *str) >> > { >> >+ DBUG_ENTER("Item_singlerow_subselect::val_str"); >> > if (!exec() && !value->null_value) >> > { >> >> JL: The bug was that this code assumes that value->null_value will not >> change when value->val_* is called. As this bug shows, this is an >> incorrect assumption. I think that it's unsafe to assume anything about >> val->null_value before calling val_ in all >> Item_singlerow_subselect::val_* >> functions. > > I think this is generally true for all Items. One cannot rely on > null_value being set until a val_xxx method has been called. > Good catch, Jørgen. > and then again: maybe not. removing the !value->null_value changed a lot of results: -NULL +0 -- didrik