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

Sequence of decimal division and multiplications returns 0 instead of the real result

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 5.5.40
    • 5.5
    • None
    • None

    Description

      MariaDB [test]> SELECT 621215273600417790 / 6 * 10000000000000000000.0 * 0.0000000001;
      +----------------------------------------------------------------+
      | 621215273600417790 / 6 * 10000000000000000000.0 * 0.0000000001 |
      +----------------------------------------------------------------+
      |                                              0.000000000000000 |
      +----------------------------------------------------------------+
      1 row in set (0.00 sec)

      MySQL also returns 0.
      PostgreSQL produces the result:

      SELECT 621215273600417790 / 6 * 10000000000000000000.0 * 0.0000000001;
                      ?column?                 
      -----------------------------------------
       103535878933402965000000000.00000000000

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.