Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL)
Description
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.
Attachments
Issue Links
- relates to
-
MDEV-7542 DOUBLE(0,0) is now converted to DOUBLE - unexpected behavior
- Closed
-
MDEV-12001 Split Item_func_round::fix_length_and_dec to virtual methods in Type_handler
- Closed