mariadb/mysql-test/suite/compat
Monty ed7534c42c 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-08-25 11:19:24 +04:00
..
maxdb MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
mssql MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
oracle MDEV-20023 Implement Oracle TRUNC() function 2025-08-25 11:19:24 +04:00
README.txt MDEV-20017 Implement TO_CHAR() Oracle compatible function 2021-05-19 22:54:12 +02:00

To run a test suite under this directory, you should use the format:

mysql-test-run --suite=compat/oracle

or to run one test:

mysql-test-run compat/oracle.test_name