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 date); |
CREATE OR REPLACE TABLE t2 AS SELECT FLOOR(a), CEIL(a),ROUND(a),TRUNCATE(a,0) FROM t1; |
+---------------+--------------+------+-----+---------+-------+
|
| Field | Type | Null | Key | Default | Extra |
|
+---------------+--------------+------+-----+---------+-------+
|
| FLOOR(a) | bigint(12) | YES | | NULL | |
|
| CEIL(a) | bigint(12) | YES | | NULL | |
|
| ROUND(a) | double(17,0) | YES | | NULL | |
|
| TRUNCATE(a,0) | double(17,0) | YES | | NULL | |
|
+---------------+--------------+------+-----+---------+-------+
|
A date value has 8 digits in numeric format: YYYYMMDD.
- INT(9) should be enough for ROUND() with a negative argument (to be checked in a separate MDEV)
- INT(8) should be enough for ROUND() with a non-negative argument
- INT(8) should be enough for all other functions
Attachments
Issue Links
- relates to
-
MDEV-23032 FLOOR()/CEIL() incorrectly calculate the precision of a DECIMAL(M,D) column.
- Closed
-
MDEV-23388 Assertion `args[0]->decimals == 0' failed in Item_func_round::fix_arg_int
- Closed