-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
affects-5.0This bug affects 5.0.x versions.This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.This bug affects 5.2.x versions.affects-5.3This bug affects 5.3.x versions.This bug affects 5.3.x versions.affects-5.4This bug affects the 5.4.x(LTS) versions.This bug affects the 5.4.x(LTS) versions.affects-6.0affects-6.1This bug affects the 6.1.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.affects-6.2affects-6.3severity/criticalsig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
The predicate NOT (('4')AND(t0.c0<=>FALSE)) is evaluated FALSE, but the second SELECT still return non-empty result.
CREATE TABLE t0(c0 BOOL, PRIMARY KEY(c0));
CREATE TABLE t1(c0 INT);
INSERT INTO t0 VALUES (FALSE);
INSERT INTO t1 VALUES (1);
SELECT NOT (('4')AND(t0.c0<=>FALSE)) FROM t0; -- {0}
SELECT * FROM t0 WHERE NOT (('4')AND(t0.c0<=>FALSE)); -- {0}2. What did you expect to see? (Required)
The second SELECT returns empty set.
3. What did you see instead (Required)
The second SELECT returns one row.
4. What is your TiDB version? (Required)
| Release Version: v6.2.0-alpha-159-ge0527ba27
Edition: Community
Git Commit Hash: e0527ba
Git Branch: master
UTC Build Time: 2022-06-21 11:55:54
GoVersion: go1.18.3
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
Store: unistore |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
affects-5.0This bug affects 5.0.x versions.This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.This bug affects 5.2.x versions.affects-5.3This bug affects 5.3.x versions.This bug affects 5.3.x versions.affects-5.4This bug affects the 5.4.x(LTS) versions.This bug affects the 5.4.x(LTS) versions.affects-6.0affects-6.1This bug affects the 6.1.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.affects-6.2affects-6.3severity/criticalsig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.