Loading mysql-test/r/case.result +7 −0 Original line number Diff line number Diff line Loading @@ -177,3 +177,10 @@ from t1 where b=3 group by b; min(a) min(case when 1=1 then a else NULL end) min(case when 1!=1 then NULL else a end) 2 2 2 drop table t1; 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 @@ -99,3 +99,10 @@ a NULLIF(a,'') NULL NULL NULL 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 @@ -183,3 +183,10 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3; select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3; 5 mod 3 5 mod -3 -5 mod 3 -5 mod -3 2 2 -2 -2 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 +5 −0 Original line number Diff line number Diff line Loading @@ -203,3 +203,8 @@ select @@global.version; select @@session.VERSION; @@session.VERSION # set @a=18446744073709551615; select @a; @a 18446744073709551615 End of 4.1 tests mysql-test/t/case.test +9 −1 Original line number Diff line number Diff line Loading @@ -130,4 +130,12 @@ 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 # # 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 @@ -177,3 +177,10 @@ from t1 where b=3 group by b; min(a) min(case when 1=1 then a else NULL end) min(case when 1!=1 then NULL else a end) 2 2 2 drop table t1; 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 @@ -99,3 +99,10 @@ a NULLIF(a,'') NULL NULL NULL 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 @@ -183,3 +183,10 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3; select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3; 5 mod 3 5 mod -3 -5 mod 3 -5 mod -3 2 2 -2 -2 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 +5 −0 Original line number Diff line number Diff line Loading @@ -203,3 +203,8 @@ select @@global.version; select @@session.VERSION; @@session.VERSION # set @a=18446744073709551615; select @a; @a 18446744073709551615 End of 4.1 tests
mysql-test/t/case.test +9 −1 Original line number Diff line number Diff line Loading @@ -130,4 +130,12 @@ 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 # # 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