Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1(EOL), 10.2(EOL), 10.3(EOL)
Description
CREATE OR REPLACE TABLE t1 AS SELECT 1; |
SHOW CREATE TABLE t1; |
+-------+----------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+----------------------------------------------------------------------------------------------+
|
| t1 | CREATE TABLE `t1` (
|
`1` int(1) NOT NULL DEFAULT '0'
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+----------------------------------------------------------------------------------------------+
|
CREATE OR REPLACE TABLE t1 AS SELECT 1 UNION SELECT 1; |
SHOW CREATE TABLE t1; |
+-------+--------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+--------------------------------------------------------------------------------------------------+
|
| t1 | CREATE TABLE `t1` (
|
`1` bigint(20) NOT NULL DEFAULT '0'
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+--------------------------------------------------------------------------------------------------+
|
Notice:
- The first CREATE statement made a column of the int(1) type.
- The second CREATE statement with UNION made a column the bigint(20) type. Looks excessive. An int column would be enough.
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
- Closed
- causes
-
MDEV-16347 Integer literal is typed as MYSQL_TYPE_LONG
- Closed
- relates to
-
MDEV-12613 UNION creates excessive integer column types for functions
- Open