[MDEV-12592] Illegal mix of collations with the HEX function Created: 2017-04-27  Updated: 2017-04-27  Resolved: 2017-04-27

Status: Closed
Project: MariaDB Server
Component/s: Character Sets
Affects Version/s: 10.1, 10.2, 10.3
Fix Version/s: 10.3.1

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None


 Description   

SET NAMES utf8;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1);
SELECT IF(a<' ',HEX(a),a) FROM t1;

ERROR 1267 (HY000): Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation 'if'

The error is incorrect. The HEX function returns a string in ASCII range, so it should be safe to convert it to latin1.


Generated at Thu Feb 08 07:58:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.