Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL)
-
None
-
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.