Skip to content

DDL should report an error when creating a generated column with function "grouping" #49909

@lcwangchao

Description

@lcwangchao

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

> create table t(a int, b int as ((grouping(a))) stored);

2. What did you expect to see? (Required)

In MySQL, it reports an error:

mysql> create table t(a int, b int as ((grouping(a))) stored);
ERROR 1111 (HY000): Invalid use of group function

3. What did you see instead (Required)

mysql> create table t(a int, b int as ((grouping(a))) stored);
Query OK, 0 rows affected (0.09 sec)

4. What is your TiDB version? (Required)

master

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-5.4This bug affects the 5.4.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.component/ddlThis issue is related to DDL of TiDB.severity/moderatetype/bugThe issue is confirmed as a bug.type/regression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions