Description:
From my understanding, the first query below should return empty, but it is actually return one row.
mysql> SELECT ALL TRUE FROM t0 WHERE (0.19839762360107815 IS NULL) NOT IN (JSON_ARRAY(NULL), ( EXISTS (SELECT 1)) AND (t0.c1)); -- 1 row
+------+
| TRUE |
+------+
| 1 |
+------+
1 row in set (0.00 sec)
mysql>
mysql> SELECT (0.19839762360107815 IS NULL) NOT IN (JSON_ARRAY(NULL), ( EXISTS (SELECT 1)) AND (t0.c1)) FROM t0; -- {0}
+-------------------------------------------------------------------------------------------+
| (0.19839762360107815 IS NULL) NOT IN (JSON_ARRAY(NULL), ( EXISTS (SELECT 1)) AND (t0.c1)) |
+-------------------------------------------------------------------------------------------+
| 0 |
+-------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
How to repeat:
DROP TABLE IF EXISTS t0;
CREATE TABLE IF NOT EXISTS t0(c1 LONGTEXT) ;
INSERT INTO t0(c1) VALUES('y3');
SELECT ALL TRUE FROM t0 WHERE (0.19839762360107815 IS NULL) NOT IN (JSON_ARRAY(NULL), ( EXISTS (SELECT 1)) AND (t0.c1)); -- 1 row
SELECT (0.19839762360107815 IS NULL) NOT IN (JSON_ARRAY(NULL), ( EXISTS (SELECT 1)) AND (t0.c1)) FROM t0; -- {0}