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

vague alias usage in GROUP BY clause

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3.23
    • N/A
    • Documentation
    • None
    • 5.4.19-200.fc31.x86_64

    Description

      DROP TEMPORARY TABLE IF EXISTS `test_set`;
      CREATE TEMPORARY TABLE `test_set`
      (
          `id`     INT NOT NULL auto_increment PRIMARY KEY,
          `tag`    VARCHAR(255),
          `tag2`  VARCHAR(255)
      );
       
      INSERT INTO test_set (tag, tag2)
      VALUES ('hello', 'a'),
             ('hello', 'b'),
             ('world', 'c');
       
      SELECT COUNT(*), tag2 as tag
      FROM test_set
      GROUP BY tag;
      

      Not Equal to

      SELECT COUNT(*), tag2 as tag3
      FROM test_set
      GROUP BY tag3;
      

      Attachments

        Activity

          People

            greenman Ian Gilfillan
            pchela.ilya Ilya P
            Votes:
            1 Vote for this issue
            Watchers:
            4 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.