[MCOL-4856] count(*) no result for utf8mb3 if utf8mb4 column in subquery Created: 2021-09-02  Updated: 2023-02-17

Status: Open
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 5.5.1
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: andreas eschbacher Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: count
Environment:

RHEL 8.2


Attachments: JPEG File 01_show_create_table.JPG     JPEG File 02_select_data.JPG     JPEG File 03_count_and_select_utf8.JPG     JPEG File 04_count_and_select_utf8mb4.JPG    

 Description   

The following problem occurs with Columnstore 5.5.1 and older:

CREATE TABLE `test_utf8mb4` (
`id` varchar(36) NOT NULL,
`name` varchar(100) NOT NULL
) ENGINE=Columnstore CHARSET=utf8mb4;

CREATE TABLE `test_utf8` (
`id` varchar(36) NOT NULL,
`name` varchar(100) NOT NULL
) ENGINE=Columnstore CHARSET=utf8;

insert into test_utf8mb4 (id, name) values ('1', 'a');
insert into test_utf8mb4 (id, name) values ('2', 'b');
insert into test_utf8 (id, name) values ('1', 'a');
insert into test_utf8 (id, name) values ('2', 'b');
commit;

select count fromtest_utf8 where id in (select id from test_utf8mb4 where name in ('a')); – error: should return 1, but it returns 0
select * from test_utf8 where id in (select id from test_utf8mb4 where name in ('a')); – ok, returns 1 row !!!
select count from test_utf8mb4 where id in (select id from test_utf8 where name in ('a')); – ok, returns 1
select * from test_utf8mb4 where id in (select id from test_utf8 where name in ('a')); – ok, returns 1 row


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