Details
Description
Consider the following test case:
CREATE TABLE t0(c0 INT); |
INSERT INTO t0(c0) VALUES(123); |
SELECT t0.c0 AS ref0 FROM t0 WHERE 1 = (NOT(NOT(t0.c0))); |
The query does not fetch any rows.
The expected result should be:
ref0 |
---|
123 |
The condition evaluates to true in the WHERE clause for the row in the table. This is verified as follows:
SELECT t0.c0, 1 = (NOT(NOT(t0.c0))) FROM t0; |
t0.c0 | 1 = (NOT(NOT(t0.c0))) |
---|---|
123 | 1 |
It is likely that the expression NOT(NOT(t0.c0)) was incorrectly optimized as t0.c0.
Attachments
Issue Links
- relates to
-
MDEV-35435 Inconsistent behavior with NOT and ANY in WHERE Clause
-
- Confirmed
-
-
MDEV-37683 incorrect results for NOT operator on DATE_FORMAT with invalid arguments
-
- Confirmed
-