Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5.22, 11.1.2
-
docker run -it -p 3307:3306 -e MARIADB_ROOT_PASSWORD=root mariadb:latest
Description
The same query returns different results if changing table_elimination:
CREATE TABLE t0(c0 FLOAT); |
CREATE TABLE t1(c0 FLOAT); |
INSERT INTO t0 VALUES (DEFAULT), (DEFAULT); |
INSERT INTO t1 VALUES (1); |
CREATE UNIQUE INDEX ic0 USING BTREE ON t0(c0 ASC); |
 |
SELECT t1.c0 FROM t1 LEFT JOIN t0 ON (t0.c0 IS NULL); -- {1} |
SET SESSION optimizer_switch = 'table_elimination=off'; |
SELECT t1.c0 FROM t1 LEFT JOIN t0 ON (t0.c0 IS NULL); -- {1}, {1} |