Not sure if this is a bug, but when selecting from a table using a unique index (and implicit casting of type), multiple rows are returned, one of which is obviously wrong.
DROP TABLE IF EXISTS index_test;
CREATE TABLE index_test (
string VARCHAR(40),
number BIGINT,
UNIQUE INDEX uq_string(string),
UNIQUE INDEX uq_number(number)
) ENGINE = INNODB;
INSERT INTO index_test
(string, number)
VALUES
("42356411000001102", 42356411000001102),
("42356411000001104", 42356411000001104);
SELECT * FROM index_test WHERE number = 42356411000001102; -- 1 Row NATIVE BIGINT
SELECT * FROM index_test WHERE string = "42356411000001102"; -- 1 Row NATIVE VARCHAR
SELECT * FROM index_test WHERE number = "42356411000001102"; -- 1 Row CASTING
SELECT * FROM index_test WHERE string = 42356411000001102; -- 2 ROWS!!! CASTING