[MDEV-20890] Illegal mix of collations with UUID() Created: 2019-10-24  Updated: 2019-11-05  Resolved: 2019-11-05

Status: Closed
Project: MariaDB Server
Component/s: Data types
Affects Version/s: 5.5, 10.1, 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.5.0

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

Issue Links:
Blocks
blocks MDEV-4958 Adding datatype UUID Closed

 Description   

Illegal mix of collations with UUID()

SET NAMES utf8 COLLATE utf8_unicode_ci;
SELECT uuid()>'';

ERROR 1267 (HY000): Illegal mix of collations (utf8_general_ci,COERCIBLE) and (utf8_unicode_ci,COERCIBLE) for operation '>'



 Comments   
Comment by Alexander Barkov [ 2019-10-28 ]

Fixing UUID() as follows:

  • changing the collation derivation to lower (from COERCIBLE to NUMERIC)
  • changing the collation from utf8_general_ci to latin1_swedish_ci

So now UUID() has a lower collation priority than a string literal (or an expression derived from a string literal).

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