|
CREATE OR REPLACE TABLE t1 (a DOUBLE(255,4),b DOUBLE(255,3));
|
CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(a,b) FROM t1;
|
SHOW CREATE TABLE t2;
|
+-------+---------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+---------------------------------------------------------------------------------------------------------+
|
| t2 | CREATE TABLE `t2` (
|
`COALESCE(a,b)` double(256,4) DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+---------------------------------------------------------------------------------------------------------+
|
Notice, a column of an impossible type double(256,4) was created.
If I try to create a column of the same type directly, I correctly get an error:
CREATE OR REPLACE TABLE t1 (a DOUBLE(256,4));
|
ERROR 1439 (42000): Display width out of range for 'a' (max = 255)
|
|