You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wrong null rejective with nulleq and is not null #58793
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
DROPTABLE IF EXISTS t0;
DROPTABLE IF EXISTS t1;
CREATETABLEt0(c0 TEXT(227));
CREATETABLEt1LIKE t0;
INSERT INTO t1 VALUES ('');
SELECTCOUNT(*) FROM t1 LEFT JOIN t0 ONt0.c0<>t1.c0WHERE (NULLANDt1.c0) <=> (t0.c0IS NOT NULL);
2. What did you expect to see? (Required)
see the following case:
3. What did you see instead (Required)
// MySQL 8.4.1
MySQL [test]>SELECTCOUNT(*) FROM t1 LEFT JOIN t0 ONt0.c0<>t1.c0WHERE (NULLANDt1.c0) <=> (t0.c0IS NOT NULL);
+----------+
| COUNT(*) |
+----------+
| 1 |
+----------+1 row inset (0.01 sec)
// TiDB
mysql>SELECTCOUNT(*) FROM t1 LEFT JOIN t0 ONt0.c0<>t1.c0WHERE (NULLANDt1.c0) <=> (t0.c0IS NOT NULL);
+----------+
| COUNT(*) |
+----------+
| 0 |
+----------+1 row inset (0.04 sec)
Activity
curry-oss commentedon Jan 8, 2025
/label affects-8.5
winoros commentedon Jan 22, 2025
The wrongly null rejective checking causes it.
The outer join transformed to the inner join wrongly.
[-]Bug Case in Left Join[/-][+]wrong null rejective with nulleq and is not null[/+]planner: replace outer-join null-reject evaluation with structural pr…