Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.4, 11.5(EOL), 11.6(EOL), 11.7
-
None
Description
MariaDB [test]> select localtime;
|
+---------------------+
|
| localtime |
|
+---------------------+
|
| 2024-08-28 13:48:03 |
|
+---------------------+
|
Looks wrong. According to the standard, LOCALTIME should return the TIME data type as follows:
a) If <time precision> TP is specified, then LOCALTIME(TP) is equivalent to:
|
|
CAST (CURRENT_TIME(TP) AS TIME(TP) WITHOUT TIME ZONE)
|
|
b) Otherwise, LOCALTIME is equivalent to:
|
|
CAST (CURRENT_TIME AS TIME WITHOUT TIME ZONE)
|
LOCALTIME and LOCALTIMESTAMP are implemented as aliases to CURRENT_TIMESTAMP:
lex.h: { "LOCALTIME", SYM(NOW_SYM)}, |
lex.h: { "LOCALTIMESTAMP", SYM(NOW_SYM)}, |
The alias for LOCALTIME is wrong. It should alias to CURRENT_TIME instead of CURRENT_TIMESTAMP.
Attachments
Issue Links
- relates to
-
MDEV-15751 CURRENT_TIMESTAMP should return a TIMESTAMP (WITH TIME ZONE?)
- Closed