Details
Description
Hi,
I found a logic bug in MariaDB.
In the following test case, the where condition is true, however, the query returns an empty result:
CREATE TABLE t0(c1 VARCHAR(100));
CREATE TABLE t1(c0 VARCHAR(100));
INSERT INTO t1 VALUES ('1');
SELECT t0.c1 FROM t0 RIGHT JOIN t1 ON true; – this query returns NULL, so the t0.c1 has only one value NULL
SELECT (NULL IS TRUE) IS NOT NULL; – this query returns 1, meaning this expression returns true
SELECT t0.c1 FROM t0 RIGHT JOIN t1 ON true WHERE (((t0.c1 IS TRUE) IS NOT NULL)); – this query returns empty result, however, its where condition is true, so I expect it returns one row