Details
-
Type:
Bug
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 10.1, 10.0, 5.5
-
Fix Version/s: 10.1
-
Component/s: Character Sets
-
Labels:None
Description
If I run this script with a bad byte sequence (notice '😎' is a valid 4-byte utf8mb4 character, but it's not a valid for 3-byte utf8):
SET NAMES utf8;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8, KEY(a)) ENGINE=MyISAM;
INSERT INTO t1 VALUES ('a'),('b'),('c'),('d'),('e');
SELECT * FROM t1 WHERE a='😎';
SHOW WARNINGS;
it returns empty set with a warning:
+---------+------+--------------------------------------------------------------------+ | Level | Code | Message | +---------+------+--------------------------------------------------------------------+ | Warning | 1366 | Incorrect string value: '\xF0\x9F\x98\x8E' for column 'a' at row 1 | +---------+------+--------------------------------------------------------------------+
Now if I drop the index and re-run the SELECT query:
ALTER TABLE t1 DROP KEY a; SELECT * FROM t1 WHERE a='😎'; SHOW WARNINGS;
it still returns empty set but without any warning.
It should be fixed to produce the same warnings with and without indexes.
Preferably, one warning in both cases.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions