Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
-
None
Description
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.
Attachments
Issue Links
- relates to
-
MDEV-18918 SQL mode EMPTY_STRING_IS_NULL breaks RBR upon CREATE TABLE .. SELECT
- Closed