Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-6099

Bad results for DATE_ADD(.., INTERVAL 2000000000000000000.0 SECOND)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5.36, 10.0.10
    • 5.5.38, 10.0.12
    • None

    Description

      mysql> SELECT DATE_ADD('2001-01-01 10:20:30',INTERVAL 250000000000.0 SECOND) AS c1, DATE_ADD('2001-01-01 10:20:30',INTERVAL 2000000000000000000.0 SECOND) AS c2;
      +---------------------+---------------------+
      | c1                  | c2                  |
      +---------------------+---------------------+
      | 9923-03-10 22:47:10 | 2001-01-01 10:20:30 |
      +---------------------+---------------------+

      The result for c1 is correct.
      The result for c2 is wrong. It should be NULL with a warning reporting overflow.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              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.