diff options
author | unknown <igor@rurik.mysql.com> | 2005-06-15 08:39:00 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2005-06-15 08:39:00 -0700 |
commit | 24de70926ea325dafe1c81aa64a6d86ed4ad85c3 (patch) | |
tree | 73f29489128453f0db18442788c45626544ff71f /mysql-test/t/cast.test | |
parent | 2ec50db87c1c46f575c82560d7935879e769da0e (diff) | |
parent | 1575df007448a62bec690e6842cd576cc96a3cb5 (diff) | |
download | mariadb-git-24de70926ea325dafe1c81aa64a6d86ed4ad85c3.tar.gz |
Manual merge
sql/field.cc:
Auto merged
Diffstat (limited to 'mysql-test/t/cast.test')
-rw-r--r-- | mysql-test/t/cast.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test index e7faf486ef0..356b69daf38 100644 --- a/mysql-test/t/cast.test +++ b/mysql-test/t/cast.test @@ -170,6 +170,17 @@ select cast(s1 as decimal(7,2)) from t1; drop table t1; # +# Test for bug #11283: field conversion from varchar, and text types to decimal +# + +CREATE TABLE t1 (v varchar(10), tt tinytext, t text, + mt mediumtext, lt longtext); +INSERT INTO t1 VALUES ('1.01', '2.02', '3.03', '4.04', '5.05'); + +SELECT CAST(v AS DECIMAL), CAST(tt AS DECIMAL), CAST(t AS DECIMAL), + CAST(mt AS DECIMAL), CAST(lt AS DECIMAL) from t1; + +DROP TABLE t1; # Bug @10237 (CAST(NULL DECIMAL) crashes server) # select cast(NULL as decimal(6)) as t1; |