Bug #119818 A different results occured after inserting a NULL record

Submitted: 31 Jan 8:53 Modified: 31 Jan 21:33
Reporter: fan liu Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:8.0.44 OS:Any
Assigned to: CPU Architecture:Any

[31 Jan 8:53] fan liu
Description:
The same SELECT statement returned different results after I added a NULL record.
SELECT t0.c1, t1.c0, t1.c1 FROM t1, t0 WHERE (NOT ((t0.c1) NOT IN (t1.c0))); 
c1|c0|c1|
--+--+--+
 8|8w|  |
REPLACE INTO t0(c1) VALUES(NULL);  
SELECT t0.c1, t1.c0, t1.c1 FROM t1, t0 WHERE (NOT ((t0.c1) NOT IN (t1.c0)));
Empty set;
Additional,after changing the table engine to InnoDB, they both returned Empty set.

How to repeat:
DROP DATABASE IF EXISTS test;  
CREATE DATABASE  test;  
USE test;   
CREATE TABLE `t0` ( `c0` bigint , `c1` decimal(10,0), UNIQUE KEY `c1` (`c1`)) ENGINE=MEMORY ;
CREATE TABLE `t1` ( `c0` varchar(500) , `c1` int  ) ENGINE = MEMORY;
REPLACE INTO t1(c0) VALUES("8w");  
INSERT IGNORE INTO t0(c1, c0) VALUES("8&dL", NULL); 
SELECT t0.c1, t1.c0, t1.c1 FROM t1, t0 WHERE (NOT ((t0.c1) NOT IN (t1.c0)));  
REPLACE INTO t0(c1) VALUES(NULL);  
SELECT t0.c1, t1.c0, t1.c1 FROM t1, t0 WHERE (NOT ((t0.c1) NOT IN (t1.c0)));
[31 Jan 21:33] Roy Lyseng
Thank you for the bug report.
Verified as described.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.