Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 5.5, 10.0, 10.1, 10.2
-
Fix Version/s: 5.5.50
-
Component/s: Character Sets
-
Labels:None
-
Sprint:5.5.50
Description
This problem was originally reported by email by David Hall.
This script:
SET NAMES utf8; |
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1); |
DROP VIEW v1; |
CREATE VIEW v1 AS SELECT 'a'; |
SELECT * FROM v1,t1 where t1.a=v1.a; |
returns an error:
ERROR 1267 (HY000): Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
|
This is wrong. The string constant in the view is pure ASCII so it can be safely converted to the character set of the field.