You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATETABLEt2(c0 INT, PRIMARY KEY(c0))
INSERT INTO t2(c0) VALUES (1);
SELECT*FROM t2; -- 1SELECT (c0 IN (NULL>=1)) IS NULLFROM t2; -- 1SELECT*FROM t2 WHERE ((c0 IN (NULL>=1)) IS NULL);
-- Expected: 1-- Actual: empty
The third SELECT returns an empty result, which is surprising: If the result of second query is 1 (TRUE), the value of the IN expression should be true, and thus the third query should return the row in t2.
These test cases works well in MySQL 8.0.33, however not in dolt.
I originally find this by building dolt from source version 4cffade. It could also be reproduced in 1.26.1. I haven't tried on the PR that has not merged yet.
-- We also found similar cases as belowSELECT (c0 IN (NULL NOT BETWEEN -1AND1)) IS NULLFROM t2; -- 1SELECT*FROM t2 WHERE (c0 IN (NULL NOT BETWEEN -1AND1)) IS NULL; -- emptySELECT (c0 IN (NULL*1)) IS NULLFROM t2; -- 1SELECT*FROM t2 WHERE ((c0 IN (NULL*1)) IS NULL); -- empty
Kindly inform me if these are caused by different reasons.
The text was updated successfully, but these errors were encountered:
Considering the test case below:
The third
SELECT
returns an empty result, which is surprising: If the result of second query is 1 (TRUE
), the value of theIN
expression should be true, and thus the third query should return the row int2
.These test cases works well in MySQL 8.0.33, however not in dolt.
I originally find this by building dolt from source version 4cffade. It could also be reproduced in 1.26.1. I haven't tried on the PR that has not merged yet.
Kindly inform me if these are caused by different reasons.
The text was updated successfully, but these errors were encountered: