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

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

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.36, 10.0.10
    • Fix Version/s: 5.5.38, 10.0.12
    • Component/s: None
    • Labels:

      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

              • Assignee:
                bar Alexander Barkov
                Reporter:
                bar Alexander Barkov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: