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

In the GROUP BY clause, MariaDB incorrectly handled ' ' and NULL

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 11.3.2
    • N/A
    • Server
    • None
    • x86 and macOS

    Description

      CREATE TABLE t0 (
      c0 TEXT NOT NULL
      );
      INSERT INTO t0 VALUES (' '), ('dadfad'), ('2342dfad'), ('2dfad');
       
      CREATE TABLE t1 (
      c0 TEXT NOT NULL
      );
      INSERT INTO t1 VALUES ('xxx'), ('3gf'), (''), ('dddd');
       
      SELECT count(t1.c0) FROM t1 LEFT OUTER JOIN t0 ON t0.c0 = t1.c0 GROUP BY t0.c0;
      

      Expected:

      +--------------+
      | count(t1.c0) |
      +--------------+
      |            4 |
      +--------------+
      

      Result:

      MariaDB> SELECT count(t1.c0) FROM t1 LEFT OUTER JOIN t0 ON t0.c0 = t1.c0 GROUP BY t0.c0;
      +--------------+
      | count(t1.c0) |
      +--------------+
      |            3 |
      |            1 |
      +--------------+
      2 rows in set (0.004 sec)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            yangshijie yangshijie
            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.