Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.4.31, 11.1.2
-
None
Description
The same query returns different results if changing the configuration join_cache_incremental:
CREATE TABLE t0(c0 CHAR(100), c1 FLOAT UNIQUE); |
CREATE TABLE t1(c0 CHAR(100), c1 FLOAT UNIQUE); |
CREATE TABLE t2(c0 CHAR(100), c1 FLOAT UNIQUE); |
INSERT INTO t2 VALUES ('a', 1); |
INSERT INTO t1 VALUES ('b', 2); |
INSERT INTO t1 VALUES ('', 3); |
INSERT INTO t0 VALUES ('', 4); |
INSERT INTO t0 VALUES ('c', 5); |
 |
SET SESSION optimizer_switch = 'join_cache_incremental=on'; |
SELECT t1.c1 FROM t2 CROSS JOIN t1 ON TRUE RIGHT JOIN t0 ON t1.c0 IN (t1.c0 REGEXP t1.c0); -- {3}, {3} |
SET SESSION optimizer_switch = 'join_cache_incremental=off'; |
SELECT t1.c1 FROM t2 CROSS JOIN t1 ON TRUE RIGHT JOIN t0 ON t1.c0 IN (t1.c0 REGEXP t1.c0); -- {3}, {NULL} |