Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5
-
None
-
Windows 10 Pro 64 bit
Description
Inconsistent collation treatment for some function for user variables when comparing values.
Receiving error Error Code: 1267. Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' for some operations that previously worked on 10.3.23, but now fails on 10.5 (10.5.1 ... 10.5.4).
Comparisons for functions tested so far that fail with the above error:
SET @x:='dummy';
|
SELECT @x:= 123456789, @x = BIN(@x);
|
SELECT @x:= 123456789, @x = FORMAT(@x, 4);
|
SELECT @x:= 123456789, @x = JSON_QUOTE(@x);
|
SELECT @x:= 123456789, @x = MD5(@x);
|
SELECT @x:= 123456789, @x = SHA1(@x);
|
SELECT @x:= 123456789, @x = SHA2(@x, 512);
|
SELECT @x:= 123456789, @x = FORMAT(@x,'#,###,###.##');
|
Importantly, this will work if the first line is SET @x:=1;. Also, if @x = is removed, they also work.
I suspect that this has to do with the collation of user variables acting differently in v10.5, and may be related to MDEV-21815 [#https://jira.mariadb.org/browse/MDEV-21815].
Attachments
Issue Links
- relates to
-
MDEV-23250 User variable loses its character set
- Open
-
MDEV-21815 Incorrect character set / collation for user variables
- Closed