Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
-
None
Description
CREATE OR REPLACE TABLE t1 (a BIGINT); |
CREATE OR REPLACE TABLE t2 AS SELECT |
a, ROUND(a), TRUNCATE(a,0), FLOOR(a), CEILING(a) FROM t1; |
DESC t2; |
+---------------+---------------+------+-----+---------+-------+
|
| Field | Type | Null | Key | Default | Extra |
|
+---------------+---------------+------+-----+---------+-------+
|
| a | bigint(20) | YES | | NULL | |
|
| ROUND(a) | bigint(19) | YES | | NULL | |
|
| TRUNCATE(a,0) | bigint(19) | YES | | NULL | |
|
| FLOOR(a) | decimal(19,0) | YES | | NULL | |
|
| CEILING(a) | decimal(19,0) | YES | | NULL | |
|
+---------------+---------------+------+-----+---------+-------+
|
The data types for all columns with functions are not equal to the original data type. Looks wrong. All data types are expected to be bigint(20).
Attachments
Issue Links
- relates to
-
MDEV-23032 FLOOR()/CEIL() incorrectly calculate the precision of a DECIMAL(M,D) column.
- Closed
-
MDEV-23350 ROUND(bigint_22_or_longer) returns a wrong data type
- Closed