Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-4454

"ORDER BY BINARY a" is not like in InnoDB

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.4.3
    • Fix Version/s: 5.5.2
    • Component/s: PrimProc
    • Labels:
      None
    • Sprint:
      2021-1

      Description

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a VARCHAR(32) CHARACTER SET latin1) ENGINE=InnoDB;
      INSERT INTO t1 VALUES ('A'),('A ');
      SELECT QUOTE(a) FROM t1 ORDER BY a, BINARY(a) DESC;
      

      +----------+
      | QUOTE(a) |
      +----------+
      | 'A '     |
      | 'A'      |
      +----------+
      

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a VARCHAR(32) CHARACTER SET latin1) ENGINE=ColumnStore;
      INSERT INTO t1 VALUES ('A'),('A ');
      SELECT QUOTE(a) FROM t1 ORDER BY a, BINARY(a) DESC;
      

      +----------+
      | QUOTE(a) |
      +----------+
      | 'A'      |
      | 'A '     |
      +----------+
      

      Notice, ColumnStore returns the two records in reverse order.

        Attachments

          Activity

            People

            Assignee:
            bar Alexander Barkov
            Reporter:
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration