maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #12709
Re: 9c1e36696f3: MDEV-20025: ADD_MONTHS() Oracle function
Hi!
On Fri, Apr 16, 2021 at 8:25 PM Sergei Golubchik <serg@xxxxxxxxxxx> wrote:
> > +++ 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.
Added to test case.
I didn't originally think that was important as ADD_MONTS is just a wrapper for
Item_date_add_internval, which should already have tests for things like this.
Regards,
Monty
References