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 BIT(64)); |
INSERT INTO t1 VALUES (0xFFFFFFFFFFFFFFFF); |
CREATE OR REPLACE TABLE t2 AS |
SELECT a, FLOOR(a), CEILING(a), TRUNCATE(a,0), ROUND(a) FROM t1; |
SHOW CREATE TABLE t2; |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| t2 | CREATE TABLE `t2` (
|
`a` bit(64) DEFAULT NULL,
|
`FLOOR(a)` decimal(64,0) DEFAULT NULL,
|
`CEILING(a)` decimal(64,0) DEFAULT NULL,
|
`TRUNCATE(a,0)` bigint(64) unsigned DEFAULT NULL,
|
`ROUND(a)` decimal(64,0) unsigned DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
The data type for all columns with functions are wrong. The expected data type is BIGINT(20) UNSIGNED.
Attachments
Issue Links
- relates to
-
MDEV-23032 FLOOR()/CEIL() incorrectly calculate the precision of a DECIMAL(M,D) column.
- Closed