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

Collation aggregation for IN works differenly for scalar and ROW

Details

    Description

      Collation aggregation for IN works differently for scalar and row arguments.

      This script demonstrates the same problem:

      SET NAMES utf8;
      SELECT
        'i' = 'j' COLLATE utf8_roman_ci  AS c1,
         ('i') IN ('j' COLLATE utf8_roman_ci) AS c2,
         ('i',1) IN (('j' COLLATE utf8_roman_ci,1),('j' COLLATE utf8_roman_ci,1)) AS c3;
      

      +----+----+----+
      | c1 | c2 | c3 |
      +----+----+----+
      |  1 |  1 |  0 |
      +----+----+----+
      

      i and j are equal letters in utf8_roman_ci
      So:

      • c1 doing IN for scalar data returns the expected result
      • c2 doing IN for ROW data with one value returns the expected result
      • c3 doing IN for ROW data with more than one values returns a wrong result

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              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.