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

Reading a Columnstore table via a view using "count" crashes when the view has "order by" in definition

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 23.02.3
    • 23.10.3
    • None
    • RHEL 8 , MDB 10.6.9 CS 6.4.3
    • 2024-1

    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.

      Attachments

        Issue Links

          Activity

            aeae81 andreas eschbacher created issue -

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

            aeae81 andreas eschbacher added a comment - create view Columnstore with group by is a workaround but not a valid solution for us.
            David.Hall David Hall (Inactive) made changes -
            Field Original Value New Value
            David.Hall David Hall (Inactive) made changes -
            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: bux 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.
            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.

            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.

            David.Hall David Hall (Inactive) added a comment - 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.
            David.Hall David Hall (Inactive) made changes -
            Summary MariaDB Columnstore with views: reading a CS table via a view using "count" crashes when the view has "order by" in definition Reading a CS table via a view using "count" errors when the view has "order by" in definition
            alexey.vorovich alexey vorovich (Inactive) made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked higher
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked lower
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked higher
            toddstoffel Todd Stoffel (Inactive) made changes -
            Fix Version/s Icebox [ 22302 ]
            valerii Valerii Kravchuk made changes -
            Affects Version/s 23.02.3 [ 28901 ]
            ccalender Chris Calender (Inactive) made changes -
            Summary Reading a CS table via a view using "count" errors when the view has "order by" in definition Reading a CS table via a view using "count" crashes when the view has "order by" in definition
            ccalender Chris Calender (Inactive) made changes -
            Summary Reading a CS table via a view using "count" crashes when the view has "order by" in definition Reading a Columnstore table via a view using "count" crashes when the view has "order by" in definition
            leonid.fedorov Leonid Fedorov made changes -
            Assignee Sergey Zefirov [ JIRAUSER47362 ]
            leonid.fedorov Leonid Fedorov made changes -
            Fix Version/s 23.10 [ 28540 ]
            Fix Version/s Icebox [ 22302 ]
            sergey.zefirov Sergey Zefirov made changes -
            sergey.zefirov Sergey Zefirov made changes -
            sergey.zefirov Sergey Zefirov made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            julien.fritsch Julien Fritsch made changes -
            Sprint 2024-1 [ 755 ]
            julien.fritsch Julien Fritsch made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            julien.fritsch Julien Fritsch made changes -
            Priority Critical [ 2 ] Major [ 3 ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 201991
            sergey.zefirov Sergey Zefirov made changes -
            Status In Progress [ 3 ] In Testing [ 10301 ]

            verified on develop 2024-07-23

            kirill.perov@mariadb.com Kirill Perov (Inactive) added a comment - verified on develop 2024-07-23
            kirill.perov@mariadb.com Kirill Perov (Inactive) made changes -
            Resolution Fixed [ 1 ]
            Status In Testing [ 10301 ] Closed [ 6 ]
            leonid.fedorov Leonid Fedorov made changes -
            Fix Version/s 23.10.3 [ 29862 ]
            Fix Version/s 23.10 [ 28540 ]

            People

              sergey.zefirov Sergey Zefirov
              aeae81 andreas eschbacher
              Votes:
              1 Vote for this issue
              Watchers:
              6 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.