|
CREATE OR REPLACE TABLE t1 AS SELECT ROUND(10,NULL) AS a;
|
SHOW CREATE TABLE t1;
|
+-------+-------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+-------------------------------------------------------------------------------------------+
|
| t1 | CREATE TABLE `t1` (
|
`a` double(0,0) DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+-------------------------------------------------------------------------------------------+
|
If I try to create a column of the type DOUBLE(0,0) directly, it gets converted to DOUBLE with not fixed length and dec:
CREATE OR REPLACE TABLE t1 (a DOUBLE(0,0));
|
SHOW CREATE TABLE t1;
|
+-------+--------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+--------------------------------------------------------------------------------------+
|
| t1 | CREATE TABLE `t1` (
|
`a` double DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+--------------------------------------------------------------------------------------+
|
ROUND should be fixed to be consistent with the direct type declaration.
|