diff options
author | unknown <iggy@rolltop.ignatz42.dyndns.org> | 2006-09-28 14:30:20 -0400 |
---|---|---|
committer | unknown <iggy@rolltop.ignatz42.dyndns.org> | 2006-09-28 14:30:20 -0400 |
commit | 155b417c303aa78d85360c5131da82d9563b15e8 (patch) | |
tree | 00d8223a8610a3b2bcfad70184770c407e986575 /mysql-test/t/analyse.test | |
parent | 27fe6590f4d7b202e9c59e198b9d6450072a2592 (diff) | |
download | mariadb-git-155b417c303aa78d85360c5131da82d9563b15e8.tar.gz |
Bug#20305: PROCEDURE ANALYSE() returns wrong M for FLOAT(M, D) and DOUBLE(M, D)
mysql-test/r/analyse.result:
Added Results
mysql-test/t/analyse.test:
Added test cases to make sure field_str and field_real return correctly.
sql/sql_analyse.cc:
According the manaul, when declaring a FLOAT(M, N), N equals the number of decimal places and M equals the total number of
digits in the number.
Diffstat (limited to 'mysql-test/t/analyse.test')
-rw-r--r-- | mysql-test/t/analyse.test | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mysql-test/t/analyse.test b/mysql-test/t/analyse.test index dfca8f575a4..88fe8dc55e7 100644 --- a/mysql-test/t/analyse.test +++ b/mysql-test/t/analyse.test @@ -82,4 +82,16 @@ create table t2 (country_id int primary key, country char(20) not null); insert into t2 values (1, 'USA'),(2,'India'), (3,'Finland'); select product, sum(profit),avg(profit) from t1 group by product with rollup procedure analyse(); drop table t1,t2; -# End of 4.1 tests + +# +# Bug #20305 PROCEDURE ANALYSE() returns wrong M for FLOAT(M, D) and DOUBLE(M, D) +# + +create table t1 (f1 double(10,5), f2 char(10), f3 double(10,5)); +insert into t1 values (5.999, "5.9999", 5.99999), (9.555, "9.5555", 9.55555); +select f1 from t1 procedure analyse(1, 1); +select f2 from t1 procedure analyse(1, 1); +select f3 from t1 procedure analyse(1, 1); +drop table t1; + +--echo End of 4.1 tests |