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

UNION of FLOAT type results in erroneous precision

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.53, 10.0.27, 10.1.20, 10.2.2
    • Fix Version/s: 10.2.10
    • Component/s: Data types
    • Labels:
      None

      Description

      MariaDB [test]> create table t1(f float);
      Query OK, 0 rows affected (0.03 sec)
       
      MariaDB [test]> insert into t1 values(1.1);
      Query OK, 1 row affected (0.02 sec)
       
      MariaDB [test]> select f from t1 union select 1;
      +------+
      | f    |
      +------+
      |  1.1 |
      |    1 |
      +------+
      2 rows in set (0.00 sec)
       
      MariaDB [test]> select 1 union select f from t1;
      +-------------------+
      | 1                 |
      +-------------------+
      |                 1 |
      | 1.100000023841858 |
      +-------------------+
      2 rows in set (0.00 sec)
       
      MariaDB [test]> select "foo" union select f from t1;
      +--------------+
      | foo          |
      +--------------+
      | foo          |
      | 1.1000000238 |
      +--------------+
      2 rows in set (0.00 sec)
      

        Attachments

          Activity

            People

            Assignee:
            bar Alexander Barkov
            Reporter:
            nirbhay_c Nirbhay Choubey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration