Loading mysql-test/r/case.result +7 −0 Original line number Diff line number Diff line Loading @@ -200,3 +200,10 @@ CEMPNUM EMPMUM1 EMPNUM2 0.00 0 0.00 2.00 2 NULL DROP TABLE t1,t2; SELECT CASE 1 WHEN 1 THEN 18446744073709551615 ELSE 1 END; CASE 1 WHEN 1 THEN 18446744073709551615 ELSE 1 END 18446744073709551615 SELECT COALESCE(18446744073709551615); COALESCE(18446744073709551615) 18446744073709551615 End of 4.1 tests mysql-test/r/func_if.result +7 −0 Original line number Diff line number Diff line Loading @@ -128,3 +128,10 @@ f1 f2 if(f1, 40.0, 5.00) 0 0 5.00 1 1 40.00 drop table t1; SELECT IF(1 != 0, 18446744073709551615, 1); IF(1 != 0, 18446744073709551615, 1) 18446744073709551615 SELECT IFNULL(NULL, 18446744073709551615); IFNULL(NULL, 18446744073709551615) 18446744073709551615 End of 4.1 tests mysql-test/r/func_test.result +7 −0 Original line number Diff line number Diff line Loading @@ -204,3 +204,10 @@ NULL SELECT GREATEST(1.5E+2,1.3E+2,NULL) FROM DUAL; GREATEST(1.5E+2,1.3E+2,NULL) NULL SELECT GREATEST(1, 18446744073709551615); GREATEST(1, 18446744073709551615) 18446744073709551615 SELECT LEAST(1, 18446744073709551615); LEAST(1, 18446744073709551615) 1 End of 4.1 tests mysql-test/r/user_var.result +1 −0 Original line number Diff line number Diff line Loading @@ -301,3 +301,4 @@ select @var; @var 3 drop table t1; End of 4.1 tests mysql-test/t/case.test +9 −2 Original line number Diff line number Diff line Loading @@ -133,8 +133,6 @@ select min(a), min(case when 1=1 then a else NULL end), from t1 where b=3 group by b; drop table t1; # End of 4.1 tests # # Tests for bug #9939: conversion of the arguments for COALESCE and IFNULL Loading @@ -154,3 +152,12 @@ SELECT IFNULL(t2.EMPNUM,t1.EMPNUM) AS CEMPNUM, FROM t1 LEFT JOIN t2 ON t1.EMPNUM=t2.EMPNUM; DROP TABLE t1,t2; # # Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various # functions # - UNSIGNED values in CASE and COALESCE are treated as SIGNED # SELECT CASE 1 WHEN 1 THEN 18446744073709551615 ELSE 1 END; SELECT COALESCE(18446744073709551615); --echo End of 4.1 tests Loading
mysql-test/r/case.result +7 −0 Original line number Diff line number Diff line Loading @@ -200,3 +200,10 @@ CEMPNUM EMPMUM1 EMPNUM2 0.00 0 0.00 2.00 2 NULL DROP TABLE t1,t2; SELECT CASE 1 WHEN 1 THEN 18446744073709551615 ELSE 1 END; CASE 1 WHEN 1 THEN 18446744073709551615 ELSE 1 END 18446744073709551615 SELECT COALESCE(18446744073709551615); COALESCE(18446744073709551615) 18446744073709551615 End of 4.1 tests
mysql-test/r/func_if.result +7 −0 Original line number Diff line number Diff line Loading @@ -128,3 +128,10 @@ f1 f2 if(f1, 40.0, 5.00) 0 0 5.00 1 1 40.00 drop table t1; SELECT IF(1 != 0, 18446744073709551615, 1); IF(1 != 0, 18446744073709551615, 1) 18446744073709551615 SELECT IFNULL(NULL, 18446744073709551615); IFNULL(NULL, 18446744073709551615) 18446744073709551615 End of 4.1 tests
mysql-test/r/func_test.result +7 −0 Original line number Diff line number Diff line Loading @@ -204,3 +204,10 @@ NULL SELECT GREATEST(1.5E+2,1.3E+2,NULL) FROM DUAL; GREATEST(1.5E+2,1.3E+2,NULL) NULL SELECT GREATEST(1, 18446744073709551615); GREATEST(1, 18446744073709551615) 18446744073709551615 SELECT LEAST(1, 18446744073709551615); LEAST(1, 18446744073709551615) 1 End of 4.1 tests
mysql-test/r/user_var.result +1 −0 Original line number Diff line number Diff line Loading @@ -301,3 +301,4 @@ select @var; @var 3 drop table t1; End of 4.1 tests
mysql-test/t/case.test +9 −2 Original line number Diff line number Diff line Loading @@ -133,8 +133,6 @@ select min(a), min(case when 1=1 then a else NULL end), from t1 where b=3 group by b; drop table t1; # End of 4.1 tests # # Tests for bug #9939: conversion of the arguments for COALESCE and IFNULL Loading @@ -154,3 +152,12 @@ SELECT IFNULL(t2.EMPNUM,t1.EMPNUM) AS CEMPNUM, FROM t1 LEFT JOIN t2 ON t1.EMPNUM=t2.EMPNUM; DROP TABLE t1,t2; # # Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various # functions # - UNSIGNED values in CASE and COALESCE are treated as SIGNED # SELECT CASE 1 WHEN 1 THEN 18446744073709551615 ELSE 1 END; SELECT COALESCE(18446744073709551615); --echo End of 4.1 tests