Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.4(EOL), 10.5
-
None
Description
Under terms of MDEV-20397 we modified functions ROUND() and TRUNCATE() to handle the TIME, DATETIME, TIMESTAMP data types correctly:
SELECT ROUND(time'00:00:01.9'), TRUNCATE(TIMESTAMP'2001-01-01 00:00:01.9',0); |
+-------------------------+----------------------------------------------+
|
| ROUND(time'00:00:01.9') | TRUNCATE(TIMESTAMP'2001-01-01 00:00:01.9',0) |
|
+-------------------------+----------------------------------------------+
|
| 00:00:02 | 2001-01-01 00:00:01 |
|
+-------------------------+----------------------------------------------+
|
But the functions CEILING() and FLOOR() still convert temporal data types to numbers:
SELECT CEILING(time'00:00:01.9'), FLOOR(TIMESTAMP'2001-01-01 00:00:01.9'); |
+---------------------------+-----------------------------------------+
|
| CEILING(time'00:00:01.9') | FLOOR(TIMESTAMP'2001-01-01 00:00:01.9') |
|
+---------------------------+-----------------------------------------+
|
| 2 | 20010101000001 |
|
+---------------------------+-----------------------------------------+
|
CEILING() and FLOOR() should be fixed to return TIME (for TIME input) and DATETIME (for DATETIME and TIMESTAMP input), like ROUND() and TRUNCATE() do.
Attachments
Issue Links
- relates to
-
MDEV-20397 Support TIMESTAMP, DATETIME, TIME in ROUND() and TRUNCATE()
-
- Closed
-
-
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 |
Status | Open [ 1 ] | In Progress [ 3 ] |
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 ] |
Link |
This issue relates to |
Workflow | MariaDB v3 [ 111749 ] | MariaDB v4 [ 158154 ] |