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

Empty set when using BIT OR and BIT AND functions in WHERE

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 6.1.1
    • 6.1.1
    • PrimProc
    • None

    Description

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a DECIMAL(18,2)) ENGINE=ColumnStore;
      INSERT INTO t1 VALUES (3.4);
      SELECT a, a|4, a&4 FROM t1;
      

      +------+------+------+
      | a    | a|4  | a&4  |
      +------+------+------+
      | 3.40 |    7 |    0 |
      +------+------+------+
      

      Looks good so far.

      SELECT * FROM t1 WHERE (a|4) <> a;
      

      Empty set (0.047 sec)
      

      Looks wrong. The condition should return TRUE (see the previous SELECT): 3.40 is not equal to 7.

      SELECT * FROM t1 WHERE (a&4) <> a;
      

      Empty set (0.037 sec)
      

      Also looks wrong. The condition should return TRUE: 3.40 is not equal to 0.

      The problem was introduced by the patch for MCOL-4464.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.