Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
11.8.6
-
None
-
Ubuntu 24.04 LTS x86_64 docker image mariadb:11.8.6
-
Not for Release Notes
Description
A query involving a comparison between an INT column and a floating-point constant may return rows that do not satisfy the WHERE predicate.
In the following example, the predicate t0.c0 = 1.1 evaluates to FALSE for the row t0.c0 = 1, so the first query should return an empty set. However, it returns (1).
The second query shows that the predicate t0.c0 = 1.1 evaluates to FALSE, indicating that the returned row does not satisfy the WHERE condition.
CREATE TABLE t0(c0 INT); |
CREATE INDEX i0 ON t0(c0); |
|
|
INSERT INTO t0(c0) VALUES(1); |
|
|
SELECT t0.c0 AS ref1 FROM t0 WHERE t0.c0 = 1.1; |
/*Actual: (1); Expected: empty set*/
|
|
|
SELECT (t0.c0) = 1.1 FROM t0; |
/* Returns 1 row: (0) */ |
Attachments
Issue Links
- duplicates
-
MDEV-38199 Optimizer Error with = SOME on UNIQUE Column Using Decimal/Integer Types
-
- In Review
-