Bug #119262 Incorrect result on comparison between a float expression and an indexed SMALLINT column.
Submitted: 29 Oct 9:01
Reporter: zz z Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:9.4.0 8.4.6 OS:Any
Assigned to: CPU Architecture:Any

[29 Oct 9:01] zz z
Description:
The WHERE clause compares a floating-point expression, (3) / -1E37, with a SMALLINT column containing the value 0. 

How to repeat:
CREATE TABLE t7 (c2 SMALLINT, KEY (c2));
INSERT t7 () VALUES (0);
SELECT * FROM t7 WHERE (((3) / -1E37) = (c2)); -- return 0

CREATE TABLE t7 (c2 SMALLINT);
INSERT t7 () VALUES (0);
SELECT * FROM t7 WHERE (((3) / -1E37) = (c2)); -- return null