diff options
author | msvensson@neptunus.(none) <> | 2006-06-12 10:53:14 +0200 |
---|---|---|
committer | msvensson@neptunus.(none) <> | 2006-06-12 10:53:14 +0200 |
commit | dfc401705d43268da2ecafc4c797b2b66da518f4 (patch) | |
tree | 80e1cd69d392fefaed1665328433ea107b6d91e7 /mysql-test | |
parent | 76f066aa3290e6469ce08a18bfd4fa4ebef5479d (diff) | |
parent | 519bf5b6fc9ff01196e7be959c78687177a2c639 (diff) | |
download | mariadb-git-dfc401705d43268da2ecafc4c797b2b66da518f4.tar.gz |
Merge neptunus.(none):/home/msvensson/mysql/bug11589/my50-bug11589
into neptunus.(none):/home/msvensson/mysql/bug11589/my50-test_latest
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/type_float.result | 16 | ||||
-rw-r--r-- | mysql-test/t/type_float.test | 18 |
2 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index 61482ab282c..f2392681601 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -266,3 +266,19 @@ create table t1 (s1 float(0,2)); ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 's1'). create table t1 (s1 float(1,2)); ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 's1'). +CREATE TABLE t1 ( +f1 real zerofill, +f2 double zerofill, +f3 float zerofill); +INSERT INTO t1 VALUES ( 0.314152e+1, 0.314152e+1, 0.314152e+1); +PREPARE stmt1 FROM 'select f1, f2, f3 FROM t1'; +select f1, f2, f3 FROM t1; +f1 f2 f3 +0000000000000003.14152 0000000000000003.14152 000003.14152 +select f1, f2, f3 FROM t1; +f1 f2 f3 +0000000000000003.14152 0000000000000003.14152 000003.14152 +EXECUTE stmt1; +f1 f2 f3 +0000000000000003.14152 0000000000000003.14152 000003.14152 +DROP TABLE t1; diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test index 5bfd744e4a8..cf4b52fe65f 100644 --- a/mysql-test/t/type_float.test +++ b/mysql-test/t/type_float.test @@ -188,3 +188,21 @@ drop table t1,t2,t3; create table t1 (s1 float(0,2)); --error 1427 create table t1 (s1 float(1,2)); + +# +# MySQL Bugs: #11589: mysqltest --ps-protocol, strange output, float/double/real with zerofill +# + +CREATE TABLE t1 ( + f1 real zerofill, + f2 double zerofill, + f3 float zerofill); +INSERT INTO t1 VALUES ( 0.314152e+1, 0.314152e+1, 0.314152e+1); + +let $my_stmt= select f1, f2, f3 FROM t1; +eval PREPARE stmt1 FROM '$my_stmt'; +select f1, f2, f3 FROM t1; +eval $my_stmt; +EXECUTE stmt1; + +DROP TABLE t1; |