1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

A fix (bug #9837: round(1, 6) delivers wrong value in create table context).

sql/item_func.cc:
  A fix (bug #9837: round(1, 6) delivers wrong value in create table context).
  As we change decimals, we should change max_length accordingly.
This commit is contained in:
unknown
2005-04-19 14:44:54 +05:00
parent 24dd3ea806
commit a437b82aff
3 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,4 @@
drop table if exists t1;
select floor(5.5),floor(-5.5);
floor(5.5) floor(-5.5)
5 -6
@ -126,3 +127,13 @@ Warnings:
Note 1003 select degrees(pi()) AS `degrees(pi())`,radians(360) AS `radians(360)`
select rand(rand);
ERROR 42S22: Unknown column 'rand' in 'field list'
create table t1 select round(1, 6);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`round(1, 6)` double(7,6) NOT NULL default '0.000000'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t1;
round(1, 6)
1.000000
drop table t1;