Open suyZhong opened 1 month ago
/label fuzz/sqlancer
Seems to be another incorrect outer to inner join conversion involving case expression. ((~ ('0' AND NULL))-(CASE 0 WHEN t0.c0 THEN 0 ELSE 1 END )) is TRUE if t0.c0 is substituted with '0' It is false if t0.c0 is substituted with '1' and leads to incorrect nullability check.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
The query should return a row with value
0
, since the expression((~ (v0.c0 AND NULL)) - (CASE 0 WHEN t0.c0 THEN 0 ELSE 1 END))
is not evaluated to0
orNULL
, which should not filter out the row in the WHERE clause. MySQL 5.7 and 8.0 could return0
.3. What did you see instead (Required)
Empty table
4. What is your TiDB version? (Required)