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

XOR aggregates argument collations

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5.40, 10.0.14, 10.1(EOL)
    • 10.1.6
    • Character Sets
    • None

    Description

      mysql> SELECT '10' COLLATE utf8_general_ci XOR '20' COLLATE utf8_unicode_ci;
      ERROR 1267 (HY000): Illegal mix of collations (utf8_general_ci,EXPLICIT) and (utf8_unicode_ci,EXPLICIT) for operation 'xor'

      XOR is a numeric operation. It should not aggregate collations. The above query should return a result without an error.

      Notice, the other numeric operations work without problems:

      mysql> SELECT '10' COLLATE utf8_general_ci + '20' COLLATE utf8_unicode_ci;
      +-------------------------------------------------------------+
      | '10' COLLATE utf8_general_ci + '20' COLLATE utf8_unicode_ci |
      +-------------------------------------------------------------+
      |                                                          30 |
      +-------------------------------------------------------------+
      1 row in set (0.00 sec)

      Attachments

        Activity

          People

            bar Alexander Barkov
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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