Some basic datatypes and functions in oracle compatibility mode do not work (MDEV-19162)

[MDEV-20025] ADD_MONTHS() Oracle function Created: 2019-07-10  Updated: 2021-06-01  Resolved: 2021-05-20

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.6
Fix Version/s: 10.6.1

Type: Technical task Priority: Major
Reporter: Faisal Saeed (Inactive) Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: Compatibility

Attachments: File 10.6-add_months.patch    
Issue Links:
Relates
relates to MDEV-25752 ADD_MONTHS with a non-integer argumen... Closed

 Description   

This function is used to add / subtract months from a given date/datetime value.

It's very similar to DATE_ADD() function in MariaDB.

MariaDB: DATE_ADD(sysdate(), interval 5 months)
Oracle: ADD_MONTHS(sysdate, 5)

Oracle Doc: https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions004.htm



 Comments   
Comment by woqutech.com [ 2021-01-05 ]

The patch is implement add_months funcions using Item_date_add_interval(thd, $3, $5, INTERVAL_MONTH, 0), please review the patch, thanks!

Comment by Michael Widenius [ 2021-02-05 ]

I looked at the patch and it looks ok.
I will push it in to bb-10.6-monty today and into 10.6 next week

Generated at Thu Feb 08 08:56:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.