[MCOL-4726] Wrong result of WHERE char1_col='A' Created: 2021-05-18  Updated: 2021-05-24  Resolved: 2021-05-24

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

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

Issue Links:
Relates
relates to MCOL-495 Make string comparison not case sensi... Closed
relates to MCOL-4721 CHAR(1) is not collation-aware for GR... Closed
Sprint: 2021-8

 Description   

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a CHAR(1) CHARACTER SET latin1) ENGINE=ColumnStore;
INSERT INTO t1 VALUES ('a'),('Ã');
SELECT * FROM t1 WHERE a='A';

+------+
| a    |
+------+
| a    |
+------+

Looks wrong. It should return both rows.

Note, if I change the data type to CHAR(2), it returns two rows as expected.

Update

The problem is also repeatable with CHAR(2):

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a CHAR(2) CHARACTER SET latin1) ENGINE=ColumnStore;
INSERT INTO t1 VALUES ('aa'),('ÃÃ');
SELECT * FROM t1 WHERE a='AA';

+------+
| a    |
+------+
| aa   |
+------+

The expected result should contain return two rows.


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