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

Inconsistent conversion of ADDTIME() to number

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 5.5, 10.0, 10.1, 10.2, 10.3, 10.4
    • 10.4
    • Data types, Temporal Types
    • None

    Description

      SELECT
        CAST(ADDTIME(0, 8385959) AS SIGNED) AS ci,
        CAST(ADDTIME(0, 8385959) AS DECIMAL(30,0)) AS c0,
        CAST(ADDTIME(0, 8385959) AS DECIMAL(30,1)) AS c1,
        ADDTIME(0, 8385959)+0 AS pi,
        ADDTIME(0, 8385959)+0.0 AS c1;
      

      +------+---------+-----------+---------+-----------+
      | ci   | c0      | c1        | pi      | c1        |
      +------+---------+-----------+---------+-----------+
      |  838 | 8385959 | 8385959.0 | 8385959 | 8385959.0 |
      +------+---------+-----------+---------+-----------+
      

      The result for ci looks wrong.

      Attachments

        Activity

          People

            bar Alexander Barkov
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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