Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-23246

Illegal mix of collations

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.5
    • Fix Version/s: 10.5
    • Component/s: Character Sets, Variables
    • Labels:
      None
    • Environment:
      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

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              poseidonCore Todd Michael
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.