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

Case when~ vs case ~ when ~

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.1.4
    • 1.1.6
    • None
    • None
    • Centos 6.8
    • 2018-14, 2018-15

    Description

      mysql>create table t2(id int, nm varchar(10)) engine=columnstore;

      mysql>insert into t2 values( 1, 'AAA');
      mysql>insert into t2 values( 2, 'BBB');
      mysql>insert into t2 values( 3, 'CCC');
      mysql>

      select
      id,nm,
      charset(nm),
      collation(nm),
      charset('AAA'),
      collation('AAA'),
      (case when nm='AAA' then 1 else 0 end) as nmchk1,
      (case nm when 'AAA' then 1 else 0 end) as nmchk2
      from t2;
      ------------------------------------------------------------------------------+

      id nm charset(nm) collation(nm) charset('AAA') collation('AAA') nmchk1 nmchk2

      ------------------------------------------------------------------------------+

      1 AAA utf8 utf8_general_ci utf8 utf8_general_ci 1 0
      2 BBB utf8 utf8_general_ci utf8 utf8_general_ci 0 0
      3 CCC utf8 utf8_general_ci utf8 utf8_general_ci 0 0

      ------------------------------------------------------------------------------+
      3 rows in set (0.01 sec)

      ------>>>> The values of case when and chse ~ when are returned differently. It looks like a bug. Please confirm.

      Attachments

        Issue Links

          Activity

            People

              dleeyh Daniel Lee (Inactive)
              kyoung-yeon ssauravy
              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.