Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.4.31, 10.6.15, 10.11.5, 11.1.2, 11.2.2
-
None
-
docker run -it -p 3307:3306 -e MARIADB_ROOT_PASSWORD=root mariadb:latest
Description
The same query returns different results under different configurations of join_cache_hashed.
CREATE TABLE t0(c0 CHAR(100) PRIMARY KEY); |
CREATE TABLE t1(c0 CHAR(100) PRIMARY KEY); |
|
INSERT INTO t1 VALUES (''); |
SET SESSION join_cache_level = 5; |
INSERT INTO t0 VALUES (''); |
SET SESSION sql_log_off = ON; |
SET SESSION autocommit = 1; |
INSERT INTO t1 VALUES ('\nd'); |
|
|
SET SESSION optimizer_switch = 'join_cache_hashed=off'; |
SELECT t1.c0 FROM t0 NATURAL JOIN t1 WHERE ('\n' RLIKE t1.c0); -- {NULL} |
SET SESSION optimizer_switch = 'join_cache_hashed=on'; |
SELECT t1.c0 FROM t0 NATURAL JOIN t1 WHERE ('\n' RLIKE t1.c0); -- {} |