summaryrefslogtreecommitdiff
path: root/mysql-test/t/cast.test
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2005-06-15 19:02:35 +0500
committerunknown <hf@deer.(none)>2005-06-15 19:02:35 +0500
commite4cdb19387508ebe22bffb174d3efe6f5e4b135f (patch)
tree2268d066683e95ed6e8f926cec22816a1105f198 /mysql-test/t/cast.test
parentb0df4494522427397c6325ca53289d55e8e5329f (diff)
downloadmariadb-git-e4cdb19387508ebe22bffb174d3efe6f5e4b135f.tar.gz
Fix for bug #10337 (cast(NULL DECIMAL) crashes the server)
mysql-test/r/cast.result: test result fixed mysql-test/t/cast.test: test case added sql/item_func.cc: checks for NULL added strings/decimal.c: we need to return specified 'scale' for the rounded decimal
Diffstat (limited to 'mysql-test/t/cast.test')
-rw-r--r--mysql-test/t/cast.test6
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test
index cafecd6000d..e7faf486ef0 100644
--- a/mysql-test/t/cast.test
+++ b/mysql-test/t/cast.test
@@ -168,3 +168,9 @@ create table t1(s1 time);
insert into t1 values ('11:11:11');
select cast(s1 as decimal(7,2)) from t1;
drop table t1;
+
+#
+# Bug @10237 (CAST(NULL DECIMAL) crashes server)
+#
+select cast(NULL as decimal(6)) as t1;
+