1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00
Files
mariadb/sql-common
Monty 2fcc2b4f51 MDEV-20023 Implement Oracle TRUNC() function
It returns the DATETIME data type (which is the closest to Oracle's DATE).

The following Oracle formats are supported:
Truncate to day: DD, DDD,J
Truncate to month: MM,MON,MONTH,RM
Truncate to Year: SYEAR,SYYYY,Y,YEAR,YY,YYY,YYYY

TRUNC(date) is same as TRUNC(date, "DD")

This patch incorporates a fix for:

MDEV-37414 SIGSEGV in Binary_string::c_ptr | Item_func_trunc::get_date

Fixing the problem that the code did not take into
account that args[1] can return SQL NULL.
2025-09-30 17:37:12 +03:00
..
2025-08-03 15:01:09 +02:00
2019-05-13 17:54:04 +03:00
2019-05-14 17:18:46 +03:00
2019-05-13 17:54:04 +03:00