Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Critical
-
Resolution: Unresolved
-
11.8.1, 11.4, 11.8
Description
I run the following cases, which are expected to return the same query result.
-- case 1
|
CREATE TABLE t1 (c1 TEXT) ENGINE=InnoDB; |
INSERT INTO t1 (c1) VALUES ('a'); |
SELECT c1 FROM t1 WHERE CAST(c1 AS BINARY(7)) NOT IN (SELECT c1 FROM t1); -- {a} |
-- case 2
|
CREATE TABLE t1 (c1 TEXT, UNIQUE (c1(1))) ENGINE=InnoDB; |
INSERT INTO t1 (c1) VALUES ('a'); |
SELECT c1 FROM t1 WHERE CAST(c1 AS BINARY(7)) NOT IN (SELECT c1 FROM t1); -- actual: {}, expected: {a} |
I also try other variants of the above test cases, which results are as follows.
-- case 3
-- case 4