List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:February 11 2011 10:29am
Subject:Re: bzr commit into mysql-5.5 branch (tor.didriksen:3323) Bug#60085
View as plain text  
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


Thread
bzr commit into mysql-5.5 branch (tor.didriksen:3323) Bug#60085Tor Didriksen11 Feb
  • Re: bzr commit into mysql-5.5 branch (tor.didriksen:3323) Bug#60085Øystein Grøvlen11 Feb
  • Re: bzr commit into mysql-5.5 branch (tor.didriksen:3323) Bug#60085Jorgen Loland11 Feb
    • Re: bzr commit into mysql-5.5 branch (tor.didriksen:3323) Bug#60085Øystein Grøvlen11 Feb
      • Re: bzr commit into mysql-5.5 branch (tor.didriksen:3323) Bug#60085Tor Didriksen11 Feb