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

When executing GROUP BY NULL, Mariadb returns unexpected results

    XMLWordPrintable

Details

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

    Description

      CREATE TABLE t0 (
        c0 double unsigned zerofill NULL
      );
      CREATE TABLE t0 (
        c0 double unsigned NULL
      );
       
      INSERT INTO t0 VALUES (0.1251773127435537), (NULL), (0), (0.6665588482250941);
       
      CREATE TABLE t1(c0 BOOL);
       
      INSERT INTO t1 VALUES (NULL), (NULL), (0), (0);
       
      SELECT t0.c0 FROM t0 NATURAL RIGHT JOIN t1 GROUP BY NULL;
      
      

      Expected:

      +------+
      | c0   |
      +------+
      | NULL |
      +------+
      
      

      Result:

      MariaDB> SELECT t0.c0 FROM  t0 NATURAL RIGHT JOIN t1 GROUP BY NULL;
      +------------------------+
      | c0                     |
      +------------------------+
      | 0000000000000000000000 |
      +------------------------+
      1 row in set (0.000 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.