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

XOR aggregates argument collations

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.40, 10.0.14, 10.1
    • Fix Version/s: 10.1.6
    • Component/s: Character Sets
    • Labels:
      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

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

              Dates

              Created:
              Updated:
              Resolved: