Considering the test case below:
CREATE TABLE t1(c1 INT);
INSERT INTO t1(c1) VALUES (1);
SELECT * FROM t1 WHERE (1 AND true); -- 1
SELECT * FROM t1 WHERE (1/1 AND true);
-- Expected: 1
-- Actual: empty
The second SELECT returns an empty result, which is surprising: since the only difference between two queries is the integer 1 and float 1/1. I suppose there's some type coercion issue in floating-point, as mentioned in issue #7006
This test case works well in MySQL 8.0.33, however not in dolt.
I originally find this by building dolt from source version (76c2f46). It could also be reproduced in 1.26.1
Considering the test case below:
The second
SELECTreturns an empty result, which is surprising: since the only difference between two queries is the integer1and float1/1. I suppose there's some type coercion issue in floating-point, as mentioned in issue #7006This test case works well in MySQL 8.0.33, however not in dolt.
I originally find this by building dolt from source version (76c2f46). It could also be reproduced in 1.26.1