Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
To write mtr tests easier, we'll add CAST(x AS INTERVAL DAY_SECOND(N)).
For now it will return a VARCHAR with a specific format:
[+][DD ]hh:mm:ss[.ffffff]
|
It will be helpful to write tests with functions that now understand long time intervals:
- TIMESTMP(ts, time_interval)
- ADDTIME(ts, time_interval)
- EXTRACT(DAY FROM src)
So in this query:
SELECT
|
CAST(1223344.123456 AS INTERVAL DAY_SECOND(6)) AS cast_itds, |
EXTRACT(DAY FROM 1223344.123456) AS d, |
EXTRACT(HOUR FROM 1223344.123456) AS h; |
+-------------------+------+------+
|
| cast_itds | d | h |
|
+-------------------+------+------+
|
| 5 02:33:44.123456 | 5 | 2 |
|
+-------------------+------+------+
|
it will be clear how the day and the hour value are calculated.
Attachments
Issue Links
- blocks
-
MDEV-16991 Rounding vs truncation for TIME, DATETIME, TIMESTAMP
-
- Closed
-
- relates to
-
MDEV-17351 Wrong results for GREATEST,TIMESTAMP,ADDTIME with an out-of-range TIME-alike argument
-
- Closed
-
-
MDEV-17740 Extend EXTRACT(x AS DAY*) to understand long time intervals
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue blocks |
Link |
This issue relates to |
Link |
This issue relates to |
issue.field.resolutiondate | 2018-11-20 09:51:06.0 | 2018-11-20 09:51:06.968 |
Fix Version/s | 10.4.1 [ 23228 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 90782 ] | MariaDB v4 [ 133764 ] |