Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
12.0.2, 12.1.2, 12.2.1
-
None
-
docker pull mariadb:latest
-
Not for Release Notes
Description
Hi, MariaDB developers:
Thanks for reading my report.
A query that uses INTERSECT between two mutually exclusive logical conditions returns a non-empty result set when STRAIGHT_JOIN and LIKE are used. The same logical construction returns the correct, empty set result in the latest version of MySQL (9.4.0).
CREATE TABLE t0(c0 VARCHAR(2)) ; |
CREATE TABLE t1 LIKE t0; |
INSERT INTO t0(c0) VALUES('6'),(6); |
INSERT INTO t1(c0) VALUES(6); |
|
|
SELECT * FROM t1 STRAIGHT_JOIN t0 ON t1.c0 LIKE t0.c0 INTERSECT |
SELECT * FROM t1 STRAIGHT_JOIN t0 ON t1.c0 NOT LIKE t0.c0; -- expect: empty set |
+------+------+ |
| c0 | c0 |
|
+------+------+ |
| 6 | 6 |
|
+------+------+ |