Bug #116568 Inconsistent Behavior with NOT and ANY in WHERE Clause
Submitted: 6 Nov 12:12 Modified: 15 Nov 22:48
Reporter: Long Gu Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:8.4.2, 8.0.40 OS:Any
Assigned to: CPU Architecture:Any

[6 Nov 12:12] Long Gu
Description:
Dear MySQL developers,

I used my fuzzer to test MySQL and found a logic bug that made the MySQL server output unexpected results.

How to repeat:
Execute the following query:

```sql
SELECT 1 WHERE NOT (NOT (2 > ANY (SELECT 1)));
```

Expected Behavior:
Returns 1.

Actual Behavior:
No records returned.

I also ran the query with the two NOTs removed, and the result returned is 1:
mysql> SELECT 1 WHERE 2 > ANY (SELECT 1);
+---+
| 1 |
+---+
| 1 |
+---+
[6 Nov 12:22] MySQL Verification Team
Hello Long Gu,

Thank you for the report and feedback.
Verified as described. 

regards,
Umesh
[15 Nov 22:48] Omer Barnir
A similar issue was reported internally and was already fixed (see bug#115962)
Closing this as a duplicate