[MCOL-5249] Reading a Columnstore table via a view using "count" crashes when the view has "order by" in definition Created: 2022-10-05  Updated: 2023-06-12

Status: Confirmed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 23.02.3
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: andreas eschbacher Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: Columnstore
Environment:

RHEL 8 , MDB 10.6.9 CS 6.4.3


Attachments: File EBI-713_simple_bug_exposal.sql    
Issue Links:
Duplicate
duplicates MCOL-4234 ORDER BY clause if not included in th... Stalled

 Description   

Trying to use a view on the relational test database of EBI-711 crashes with MariaDB 10.6 (EBI05) , when the "OrderRow" table is a columnstore table:

Error Code: 1815. Internal error: MCS-2021: 'OrderID' is not in GROUP BY clause. All non-aggregate columns in the SELECT and ORDER BY clause must be included in the GROUP BY clause.
If the view is created from InnoDB tables only, everything works as expected.

Steps to reproduce (see attached):

execute EBI-713_simple_bug_exposal.sql
execute EBI-711_SampleData_relational.sql
execute EBI-713_yet_another_CS_bug.sql

TODO:

simplify bug exposal as much as possible ==> DONE.
test MariaDB 10.5 ==> UPDATE: bug exposed also on 10.5.
UPDATE: the reason for the bug is the ORDER BY in the view definition. See the simple_bug_exposal file

Additional note:

on MariaDB 10.3, the bug couldn't be exposed, because when trying to create the orderrow_CS table via a "create table ... select" crashes with the error:
EBI01 MariaDB 10.3: Error Code: 1178. The storage engine for the table doesn't support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.
This error also occurs when the used "decimal" column is NOT part of the create table / select, see the attached SQL EBI-713_yet_another_CS_bug.sql.

create view Columnstore with group by is a workaround but not a valid solution for us.



 Comments   
Comment by andreas eschbacher [ 2022-10-05 ]

create view Columnstore with group by is a workaround but not a valid solution for us.

Comment by David Hall (Inactive) [ 2022-10-12 ]

I tagged this as a duplicate of MCOL-4234, but it isn't quite. It's probable that the fix is the same, but both ways to the problem must be tested.

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