summaryrefslogtreecommitdiff
path: root/mysql-test/t/case.test
diff options
context:
space:
mode:
authorunknown <kaa@polly.local>2006-09-08 14:08:29 +0400
committerunknown <kaa@polly.local>2006-09-08 14:08:29 +0400
commitf64483cb909aa557d27fde12090baae41f5d6578 (patch)
treeecd49220ee2f3240b098af7a672ff3a7f0f6b541 /mysql-test/t/case.test
parent7a77b3d80fe711fa4e9123a8a7be782bcef1d8db (diff)
downloadmariadb-git-f64483cb909aa557d27fde12090baae41f5d6578.tar.gz
Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
- Honor unsigned_flag in the corresponding functions - Use compare_int_signed_unsigned()/compare_int_unsigned_signed() instead of explicit comparison in GREATEST() and LEAST() mysql-test/r/case.result: Added test case for bug #20924 mysql-test/r/func_if.result: Added test case for bug #20924 mysql-test/r/func_test.result: Added test case for bug #20924 mysql-test/r/user_var.result: Added test case for bug #20924 mysql-test/t/case.test: Added test case for bug #20924 mysql-test/t/func_if.test: Added test case for bug #20924 mysql-test/t/func_test.test: Added test case for bug #20924 mysql-test/t/user_var.test: Added test case for bug #20924 sql/item_cmpfunc.cc: Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions - Moved some code out of Arg_comparator to external functions to be reused in Item_func_min_max - Fixed IFNULL(), IF(), CASE() and COALESCE() sql/item_cmpfunc.h: Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions - Moved some code out of Arg_comparator to external functions to be reused in Item_func_min_max sql/item_func.cc: Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions Fixed LEAST(), GREATEST() and "SET @a=..." parts sql/item_func.h: Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions Fixed "SET @a=..." part sql/sql_class.h: Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions Fixed "SET @a=..." part
Diffstat (limited to 'mysql-test/t/case.test')
-rw-r--r--mysql-test/t/case.test6
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/t/case.test b/mysql-test/t/case.test
index fd1b6e5247f..b868ae12b69 100644
--- a/mysql-test/t/case.test
+++ b/mysql-test/t/case.test
@@ -130,4 +130,10 @@ select min(a), min(case when 1=1 then a else NULL end),
from t1 where b=3 group by b;
drop table t1;
+#
+# Bug #20924: UNSIGNED values in CASE and COALESCE are treated as SIGNED
+#
+SELECT CASE 1 WHEN 1 THEN 18446744073709551615 ELSE 1 END;
+SELECT COALESCE(18446744073709551615);
+
# End of 4.1 tests