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
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
Summary | Rounding functions return a wrong data type for a BIT argument | Rounding functions return a wrong data type for a BIT, ENUM, SET argument |
Status | Open [ 1 ] | In Progress [ 3 ] |
issue.field.resolutiondate | 2020-07-30 04:06:30.0 | 2020-07-30 04:06:30.483 |
Fix Version/s | 10.4.14 [ 24305 ] | |
Fix Version/s | 10.5.5 [ 24423 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 111772 ] | MariaDB v4 [ 158159 ] |