← Back to team overview

maria-developers team mailing list archive

Re: 9c1e36696f3: MDEV-20025: ADD_MONTHS() Oracle function

 

Hi, Monty!

On Apr 16, Michael Widenius wrote:
> commit 9c1e36696f3
> Author: Michael Widenius <michael.widenius@xxxxxxxxx>
> Date:   Fri Feb 5 17:10:43 2021 +0200
> 
> diff --git a/mysql-test/suite/compat/oracle/r/func_add_months.result b/mysql-test/suite/compat/oracle/r/func_add_months.result
> new file mode 100644
> index 00000000000..0e8ca1eef94
> --- /dev/null
> +++ b/mysql-test/suite/compat/oracle/r/func_add_months.result
> @@ -0,0 +1,85 @@
> +Test for ADD_MONTHS
> +CREATE TABLE t1(c1 int, c2 datetime, c3 date, c4 time, c5 timestamp);
> +INSERT INTO t1 VALUES (1, '2011-11-12 12:10:11', '2011-11-12', '12:10:11', '2011-11-12 12:10:11');
> +INSERT INTO t1 VALUES (2, '2021-11-12 00:23:12', '2021-11-12', '00:23:12', '2021-11-12 00:23:12');
> +INSERT INTO t1 VALUES (3, '2011-01-22 16:45:45', '2011-01-22', '16:45:45', '2011-01-22 16:45:45');
> +INSERT INTO t1 VALUES (4, '2031-05-12 04:11:34', '2031-05-12', '04:11:34', '2031-05-12 04:11:34');
> +INSERT INTO t1 VALUES (5, '2031-09-02 08:15:22', '2031-09-02', '08:15:22', '2031-09-02 08:15:22');
> +INSERT INTO t1 VALUES (6, '0000-09-02 00:00:00', '0000-09-02', '00:00:00', '1980-09-02 00:00:00');
> +INSERT INTO t1 VALUES (7, '9999-09-02', '9999-09-02', '00:00:00', '1980-09-02');

there's no last-day test here. Like ADD_MONTHS('2012-01-31', 1) = '2012-02-29'
should be here, as Oracle manual specifically documents this case.

Regards,
Sergei


Follow ups