Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5.16, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10
-
None
-
None
Description
In the WHERE condition of the query statement, the IN operation between the unsigned double value with the index and the negative value in String type is incorrect. As a result, the query result is incorrect.
mysql> DROP TABLE IF EXISTS t1; |
Query OK, 0 rows affected (0.00 sec) |
|
mysql> CREATE TABLE `t1` ( |
-> `c2` double unsigned NOT NULL, |
-> KEY `ic3` (`c2`) |
-> );
|
Query OK, 0 rows affected (0.01 sec) |
|
mysql> INSERT INTO t1 VALUES (0); |
Query OK, 1 row affected (0.00 sec)
|
|
mysql> SELECT c2,(c2 IN ('-1758183929')) FROM t1 WHERE (c2 IN ('-1758183929')); |
+----+-------------------------+ |
| c2 | (c2 IN ('-1758183929')) | |
+----+-------------------------+ |
| 0 | 0 |
|
+----+-------------------------+ |
|
As the (c2 IN ('-1758183929') is 0, the condition of the WHERE statement should be wrong as well. The result should be an empty set.