[MCOL-4666] Empty set when using BIT OR and BIT AND functions in WHERE Created: 2021-04-05  Updated: 2021-04-09  Resolved: 2021-04-08

Status: Closed
Project: MariaDB ColumnStore
Component/s: PrimProc
Affects Version/s: 6.1.1
Fix Version/s: 6.1.1

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MCOL-4644 bit operators don't work in WHERE clause Closed
Relates
relates to MCOL-4464 Bitwise operations not like in MariaDB Closed
relates to MCOL-4644 bit operators don't work in WHERE clause Closed

 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.


Generated at Thu Feb 08 02:52:04 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.