|
DEFAULT is erroneously copied in `CREATE..SELECT column`
CREATE OR REPLACE TABLE t1 (a VARCHAR(10) DEFAULT 'x');
|
CREATE OR REPLACE TABLE t2 AS SELECT a FROM t1;
|
SHOW CREATE TABLE t2;
|
+-------+------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+------------------------------------------------------------------------------------------+
|
| t2 | CREATE TABLE `t2` (
|
`a` varchar(10) DEFAULT 'x'
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+------------------------------------------------------------------------------------------+
|
Notice, the default value was copied from `t1.a` to `t2.a`. It does not look correct. It should not copy DEFAULT.
|