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

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.2(EOL), 10.3(EOL)
    • 10.4(EOL)
    • Data types
    • 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

              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.