Details
-
Bug
-
Status: Closed (View Workflow)
-
Trivial
-
Resolution: Not a Bug
-
10.3.4
Description
Selecting the max of a float value does something wonky with the precision of the value. I can't make sense of the below example.
{{MariaDB [imdb_small]> drop table example;
Query OK, 0 rows affected (0.006 sec)
MariaDB [imdb_small]> create table example (a float);
Query OK, 0 rows affected (0.009 sec)
MariaDB [imdb_small]> insert into example values (8.7);
Query OK, 1 row affected (0.002 sec)
MariaDB [imdb_small]> select max(a) from example;
-------------------
max(a) |
-------------------
8.699999809265137 |
-------------------
1 row in set (0.000 sec)
MariaDB [imdb_small]> select a from example;
------
a |
------
8.7 |
------
1 row in set (0.000 sec)
MariaDB [imdb_small]> select * from example where a = 8.7;
Empty set (0.000 sec)}}