← Back to team overview

maria-developers team mailing list archive

Re: lp:817966 causes wrong results when added into 5.5

 

Hi, Sergei!

On Jun 22, Sergei Petrunia wrote:
> Hi Sergei,
> 
> Remember I've pointed out that the testcase for lp:817966 is present 
> in 5.3 but is missing in 5.5, and we figured it was lost in the merge 
> and decided to add it?
> 
> Well, if I add the testcase into 5.5 it fails like this:
> 
> main.func_in                             [ fail ]
>         Test ended at 2012-06-20 15:11:27
> 
> CURRENT_TEST: main.func_in
> --- /home/psergey/dev2/5.5-look6/mysql-test/r/func_in.result
> +++ /home/psergey/dev2/5.5-look6/mysql-test/r/func_in.reject
> @@ -793,12 +793,10 @@
>  insert t1 values (1,1),(2,2),(3,3);
>  select * from t1 where a in ('2.1');
>  a      b
> -2      2
>  select * from t1 where b in ('2.1');
>  a      b
>  select * from t1 where a='2.1';
>  a      b
> -2      2
>  select * from t1 where b='2.1';
>  a      b
>  select * from t1 where IF(1,a,a)='2.1';
> 
> I cannot readily tell whether this is a bug or not (could be, the
> typecasting rules are changed in 5.5?)
> Do you think this should be filed as a jira issue?

I think the new result is fine. It's better that what we have in 5.3.
In 5.3 (and earlier) 2 was in some cases - but not in others - "equal"
to 2.1. Which was, in my opinion, a bug, or at least a gotcha. But with
long history, and I didn't dare to fix it - the change could potentially
break many applications.

Apparently that bug was fixed in 5.5, and 2 is no longer equal to 2.1 :)

Regards,
Sergei


References