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

PS: Wrong value for CAST(? AS DOUBLE) when using 9223372036854775808 as a parameter

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.2, 10.3
    • Fix Version/s: 10.3, 10.4
    • Component/s: Data types
    • Labels:
      None

      Description

      This query:

      EXECUTE IMMEDIATE 'SELECT CAST(? AS DOUBLE),CAST(? AS DECIMAL(20,0))' USING 9223372036854775808, 9223372036854775808;
      

      returns:

      +-----------------------+--------------------------+
      | CAST(? AS DOUBLE)     | CAST(? AS DECIMAL(20,0)) |
      +-----------------------+--------------------------+
      | -9.223372036854776e18 |      9223372036854775808 |
      +-----------------------+--------------------------+
      

      Notice:

      • the result for DOUBLE cast is wrong
      • the result for DECIMAL cast is OK

        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:

                  Git Integration