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

reverse function not work properly with non-latin chars

    XMLWordPrintable

Details

    Description

      Columnstore server is configured as UTF-8 as decribed here:
      https://mariadb.com/kb/en/library/mariadb-columnstore-system-usage/#configuring-to-use-utf-8-character-sets

      To reproduce:

       drop table  IF EXISTS rev;
       create table IF NOT EXISTS  rev (c1 varchar(8), c2 char(8), c3 varchar(32)) ENGINE=ColumnStore  DEFAULT CHARSET=UTF8 ;
      INSERT INTO rev (c1,c2,c3) VALUES('カキクケコ','カキクケコ','カキクケコ');
      INSERT INTO rev (c1,c2,c3) VALUES('ABCD','ABCD','ABCD');
      INSERT INTO rev (c1,c2,c3) VALUES('45678','45678','45678');
      INSERT INTO rev (c1,c2,c3) VALUES('45678','45678','45678');
      select c1,reverse(c1),reverse(c2),reverse(c3) from rev;
      

      Result is:

      MariaDB [rtest]> select c1,reverse(c1),reverse(c2),reverse(c3) from rev;
      +----------+-------------+-------------+-----------------+
      | c1       | reverse(c1) | reverse(c2) | reverse(c3)     |
      +----------+-------------+-------------+-----------------+
      | カキ??   | ?㭂㫂?      | ?㭂㫂?      | ??㱂㯂㭂㫂?     |
      | ABCD     | DCBA        | DCBA        | DCBA            |
      | 45??   | ??        | ??        | ???         |
      | 45678    | 87654       | 87654       | 87654           |
      +----------+-------------+-------------+-----------------+
      

      Expected behavioiur is like the result in innodb.

      MariaDB [rtest]> select c1,reverse(c1),reverse(c2),reverse(c3) from rev;
      +-----------------+-----------------+-----------------+-----------------+
      | c1              | reverse(c1)     | reverse(c2)     | reverse(c3)     |
      +-----------------+-----------------+-----------------+-----------------+
      | カキクケコ      | コケクキカ      | コケクキカ      | コケクキカ      |
      | ABCD            | DCBA            | DCBA            | DCBA            |
      | 45678      | 87654      | 87654      | 87654      |
      | 45678           | 87654           | 87654           | 87654           |
      +-----------------+-----------------+-----------------+-----------------+
      

      Attachments

        Issue Links

          Activity

            People

              dleeyh Daniel Lee (Inactive)
              Richard Richard Stracke
              Votes:
              0 Vote for this issue
              Watchers:
              7 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.