Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL)
Description
This is slightly obscure but i recently encountered it, so
> create table test (a varchar(255));
|
Query OK, 0 rows affected (0.02 sec)
|
|
> insert into test values ('-0.0');
|
Query OK, 1 row affected (0.00 sec)
|
|
> select * from test where cast(a as decimal(5,1)) < 0;
|
+------+
|
| a |
|
+------+
|
| -0.0 |
|
+------+
|
1 row in set (0.00 sec)
|
> select * from test where cast(a as decimal(5,1)) > 0;
|
Empty set (0.00 sec)
|
> select @@version;
|
+-----------------+
|
| @@version |
|
+-----------------+
|
| 10.1.14-MariaDB |
|
+-----------------+
|
1 row in set (0.00 sec)
|