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

Inconsistent conversion of ADDTIME() to number

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.5, 10.0, 10.1, 10.2, 10.3, 10.4
    • Fix Version/s: 10.4
    • Component/s: Data types, Temporal Types
    • Labels:
      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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: