XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.10.7, 10.11.6
    • N/A
    • OTHER
    • None
    • Linux (Debian) - MacOS (brew)

    Description

      Hi,

      I use DATE_SUB function to compute "age" of person.

      When I use the follow on Mariadb 10.11.6 :

      select DATE_SUB("2023-08-11 12:00:00", INTERVAL TO_DAYS("2022-01-01 12:00:00") DAY)

      The result is OK :

      0001-08-10 12:00:00

      When I try on same Mariadb server with :

      select DATE_SUB("2023-08-11 12:00:00", INTERVAL TO_DAYS("2023-01-01 12:00:00") DAY)

      The result is WRONG (in my opinion):

      NULL

      On server Mysql 5.7.9, 8.0 ,
      the result for "select DATE_SUB("2023-08-11 12:00:00", INTERVAL TO_DAYS("2023-01-01 12:00:00") DAY)" is :

      0000-00-00 12:00:00

      Can you investigate on this potential bug ?

      Thank you !

      Eric

      Attachments

        Activity

          People

            Unassigned Unassigned
            eric.brun Brun
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.