Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-36128

Query: incorrect division results, round error.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • 6.5.0
    • 6.5.0
    • query
    • Untriaged
    • Centos 64-bit
    • Yes

    Description

      Build 6.5.0-4349

       

      Query

      select 2/3

      returns

      [
       {
       "$1": 0.6666666666666666
       }
       ]

      So, we have 16 digits after dot sign.

      Now let's run the same in mysql:

      select 2/3 from dual;

      that gives me

      0.6667

      Let's increase precision:

      set div_precision_increment = 16;

      And now mysql query 

      select 2/3 from dual;

      gives me 

      0.6666666666666667
      

      which is still different from couchbase result.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            evgeny.makarenko Evgeny Makarenko (Inactive)
            evgeny.makarenko Evgeny Makarenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty