Details

    Description

      I'm not sure this is a bug or not, because there is no such configuration like auto round points.
      I thought it connect to div_precision_increment. but seems not

      all test configuration is same

      MariaDB [(none)]> show variables like '%prec%';
      +-------------------------+-------+
      | Variable_name           | Value |
      +-------------------------+-------+
      | div_precision_increment | 4     |
      +-------------------------+-------+
      

      MariaDB 10.3.24 && 10.4.14

      MariaDB [(none)]> select (55/23244*1000);
      +-----------------+
      | (55/23244*1000) |
      +-----------------+
      |          2.4000 |
      +-----------------+
       
      select cast( (55/23244*1000) as decimal(5,4));
      +----------------------------------------+
      | cast( (55/23244*1000) as decimal(5,4)) |
      +----------------------------------------+
      |                                 2.4000 |
      +----------------------------------------+
       
      MariaDB [(none)]> set div_precision_increment=8;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [(none)]> select cast( (55/23244*1000) as decimal(5,4));
      +----------------------------------------+
      | cast( (55/23244*1000) as decimal(5,4)) |
      +----------------------------------------+
      |                                 2.3662 |
      +----------------------------------------+
       
      MariaDB [(none)]> select (55/23244*1000);
      +-----------------+
      | (55/23244*1000) |
      +-----------------+
      |      2.36620000 |
      +-----------------+
      

      MariaDB 5.5 ~ 10.3.22

      MariaDB [(none)]> show variables like '%prec%';
      +-------------------------+-------+
      | Variable_name           | Value |
      +-------------------------+-------+
      | div_precision_increment | 4     |
      +-------------------------+-------+
       
      MariaDB [(none)]> select (55/23244*1000);
      +-----------------+
      | (55/23244*1000) |
      +-----------------+
      |          2.3662 |
      +-----------------+
       
      MariaDB [(none)]> select cast( (55/23244*1000) as decimal(5,4));
      +----------------------------------------+
      | cast( (55/23244*1000) as decimal(5,4)) |
      +----------------------------------------+
      |                                 2.3662 |
      +----------------------------------------+
      

      Attachments

        Issue Links

          Activity

            leciel leo cardia created issue -
            serg Sergei Golubchik made changes -
            Field Original Value New Value
            Description I'm not sure this is a bug or not, because there is no such configuration like auto round points.
            I thought it connect to div_precision_increment. but seems not

            all test configuration is same

            MariaDB [(none)]> show variables like '%prec%';
            +-------------------------+-------+
            | Variable_name | Value |
            +-------------------------+-------+
            | div_precision_increment | 4 |
            +-------------------------+-------+


            h2. MariaDB 10.3.24 && 10.4.14

            MariaDB [(none)]> select (55/23244*1000);
            +-----------------+
            | (55/23244*1000) |
            +-----------------+
            | 2.4000 |
            +-----------------+

            select cast( (55/23244*1000) as decimal(5,4));
            +----------------------------------------+
            | cast( (55/23244*1000) as decimal(5,4)) |
            +----------------------------------------+
            | 2.4000 |
            +----------------------------------------+

            MariaDB [(none)]> set div_precision_increment=8;
            Query OK, 0 rows affected (0.000 sec)

            MariaDB [(none)]> select cast( (55/23244*1000) as decimal(5,4));
            +----------------------------------------+
            | cast( (55/23244*1000) as decimal(5,4)) |
            +----------------------------------------+
            | 2.3662 |
            +----------------------------------------+

            MariaDB [(none)]> select (55/23244*1000);
            +-----------------+
            | (55/23244*1000) |
            +-----------------+
            | 2.36620000 |
            +-----------------+


            h2. MariaDB 5.5 ~ 10.3.22

            MariaDB [(none)]> show variables like '%prec%';
            +-------------------------+-------+
            | Variable_name | Value |
            +-------------------------+-------+
            | div_precision_increment | 4 |
            +-------------------------+-------+

            MariaDB [(none)]> select (55/23244*1000);
            +-----------------+
            | (55/23244*1000) |
            +-----------------+
            | 2.3662 |
            +-----------------+

            MariaDB [(none)]> select cast( (55/23244*1000) as decimal(5,4));
            +----------------------------------------+
            | cast( (55/23244*1000) as decimal(5,4)) |
            +----------------------------------------+
            | 2.3662 |
            +----------------------------------------+
            I'm not sure this is a bug or not, because there is no such configuration like auto round points.
            I thought it connect to div_precision_increment. but seems not

            all test configuration is same
            {noformat}
            MariaDB [(none)]> show variables like '%prec%';
            +-------------------------+-------+
            | Variable_name | Value |
            +-------------------------+-------+
            | div_precision_increment | 4 |
            +-------------------------+-------+
            {noformat}

            h2. MariaDB 10.3.24 && 10.4.14
            {noformat}
            MariaDB [(none)]> select (55/23244*1000);
            +-----------------+
            | (55/23244*1000) |
            +-----------------+
            | 2.4000 |
            +-----------------+

            select cast( (55/23244*1000) as decimal(5,4));
            +----------------------------------------+
            | cast( (55/23244*1000) as decimal(5,4)) |
            +----------------------------------------+
            | 2.4000 |
            +----------------------------------------+

            MariaDB [(none)]> set div_precision_increment=8;
            Query OK, 0 rows affected (0.000 sec)

            MariaDB [(none)]> select cast( (55/23244*1000) as decimal(5,4));
            +----------------------------------------+
            | cast( (55/23244*1000) as decimal(5,4)) |
            +----------------------------------------+
            | 2.3662 |
            +----------------------------------------+

            MariaDB [(none)]> select (55/23244*1000);
            +-----------------+
            | (55/23244*1000) |
            +-----------------+
            | 2.36620000 |
            +-----------------+
            {noformat}

            h2. MariaDB 5.5 ~ 10.3.22
            {noformat}
            MariaDB [(none)]> show variables like '%prec%';
            +-------------------------+-------+
            | Variable_name | Value |
            +-------------------------+-------+
            | div_precision_increment | 4 |
            +-------------------------+-------+

            MariaDB [(none)]> select (55/23244*1000);
            +-----------------+
            | (55/23244*1000) |
            +-----------------+
            | 2.3662 |
            +-----------------+

            MariaDB [(none)]> select cast( (55/23244*1000) as decimal(5,4));
            +----------------------------------------+
            | cast( (55/23244*1000) as decimal(5,4)) |
            +----------------------------------------+
            | 2.3662 |
            +----------------------------------------+
            {noformat}
            serg Sergei Golubchik made changes -
            Fix Version/s N/A [ 14700 ]
            Assignee Sergei Golubchik [ serg ]
            Resolution Not a Bug [ 6 ]
            Status Open [ 1 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            greenman Ian Gilfillan made changes -
            serg Sergei Golubchik made changes -
            Resolution Not a Bug [ 6 ]
            Status Closed [ 6 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Status Stalled [ 10000 ] Open [ 1 ]
            serg Sergei Golubchik made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s N/A [ 14700 ]
            serg Sergei Golubchik made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            serg Sergei Golubchik made changes -
            alice Alice Sherepa made changes -
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            serg Sergei Golubchik made changes -
            issue.field.resolutiondate 2020-10-29 08:33:35.0 2020-10-29 08:33:35.225
            serg Sergei Golubchik made changes -
            Fix Version/s 10.1.48 [ 25108 ]
            Fix Version/s 10.2.35 [ 25022 ]
            Fix Version/s 10.3.26 [ 25021 ]
            Fix Version/s 10.4.16 [ 25020 ]
            Fix Version/s 10.5.7 [ 25019 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 113339 ] MariaDB v4 [ 158355 ]

            People

              serg Sergei Golubchik
              leciel leo cardia
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.