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

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.5.40
    • Fix Version/s: 10.0, 5.5
    • Component/s: None
    • Labels:
      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
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              There are no comments yet on this issue.

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  elenst Elena Stepanova
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: