Bug #114218 Unexpected Results by MEMORY ENGINE
Submitted: 5 Mar 2024 4:50 Modified: 5 Mar 2024 7:01
Reporter: JINSHENG BA Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S2 (Serious)
Version:8.2.0, 8.3.0, 8.0.36 OS:Any
Assigned to: CPU Architecture:Any

[5 Mar 2024 4:50] JINSHENG BA
Description:
CREATE TABLE t0(c0 DOUBLE ZEROFILL, c1 FLOAT UNIQUE NOT NULL STORAGE DISK) ENGINE = MEMORY;
CREATE TABLE t1(c0 DECIMAL);
INSERT INTO t0(c1) VALUES(1), ('b');
INSERT INTO t1(c0) VALUES(2);

SELECT (t0.c1 = - 'a') FROM t0, t1; -- {0}, {1}
SELECT * FROM t0, t1 WHERE (t0.c1 = - 'a'); -- empty set

The expression (t0.c1 = - 'a') is evaluated to TRUE for the second row, so the second query should return one row, instead of an empty set.

How to repeat:
docker run -it -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root mysql:8.2.0

Then execute the above test case.
[5 Mar 2024 7:01] MySQL Verification Team
Hello Jinsheng Ba,

Thank you for the report and test case.
Verified as described.

regards,
Umesh