Details
-
Technical task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.6
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
Attachments
Issue Links
- relates to
-
MDEV-25752 ADD_MONTHS with a non-integer argument gives a different result on Oracle compared to MariaDB
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Labels | Compatibility |
Attachment | 10.6-add_months [ 55505 ] |
Attachment | 10.6-add_months [ 55505 ] |
Attachment | 10.6-add_months.patch [ 55518 ] |
Assignee | Michael Widenius [ monty ] |
Component/s | Data Definition - Procedure [ 10119 ] | |
Fix Version/s | 10.6.0 [ 24431 ] | |
Affects Version/s | 10.6 [ 24028 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Summary | sql_mode="oracle" does not support "ADD_MONTHS()" function | ADD_MONTHS() Oracle function |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.6.0 [ 24431 ] |
issue.field.resolutiondate | 2021-05-20 09:30:24.0 | 2021-05-20 09:30:24.747 |
Component/s | Server [ 13907 ] | |
Component/s | Data Definition - Procedure [ 10119 ] | |
Fix Version/s | 10.6.1 [ 24437 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Link |
This issue relates to |
Workflow | MariaDB v3 [ 98151 ] | MariaDB v4 [ 156465 ] |
The patch is implement add_months funcions using Item_date_add_interval(thd, $3, $5, INTERVAL_MONTH, 0), please review the patch, thanks!