[Maria-developers] lp:817966 causes wrong results when added into 5.5
![](https://secure.gravatar.com/avatar/bccaf81a23eecaecd9feaf01c7c42ff4.jpg?s=120&d=mm&r=g)
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 2012-06-20 15:11:12.000000000 +0400 +++ /home/psergey/dev2/5.5-look6/mysql-test/r/func_in.reject 2012-06-20 15:11:27.000000000 +0400 @@ -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? BR Sergei -- Sergei Petrunia, Software Developer Monty Program AB, http://askmonty.org Blog: http://s.petrunia.net/blog
![](https://secure.gravatar.com/avatar/3c2329333dd5898f2e72818af773243d.jpg?s=120&d=mm&r=g)
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
participants (2)
-
Sergei Golubchik
-
Sergei Petrunia