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

CHARSET(column) returns different result with and without ROLLUP

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.1, 10.2, 10.3, 10.4, 10.5
    • 10.5
    • Data types
    • None

    Description

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (d DATE) ENGINE=MyISAM;
      INSERT INTO t1 VALUES ('2018-12-12');
      SELECT d, CHARSET(d) AS f FROM t1 GROUP BY d;
      SELECT d, CHARSET(d) AS f FROM t1 GROUP BY d WITH ROLLUP;
      

      The first query returns:

      +------------+--------+
      | d          | f      |
      +------------+--------+
      | 2018-12-12 | binary |
      +------------+--------+
      

      The second query returns:

      +------------+--------+
      | d          | f      |
      +------------+--------+
      | 2018-12-12 | latin1 |
      | NULL       | binary |
      +------------+--------+
      

      Looks wrong. Expect equal values in the column "f" in all queries.

      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.