Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[func-sum()]ERROR 1105 (HY000): unknown error:[42000]unknown column 'c' in expr #704

Closed
lignay opened this issue Sep 14, 2021 · 4 comments
Closed
Assignees
Labels
kind/bug Something isn't working kind/compatibility The compatibility with mysql 8.0 should be discussed further. needs-triage priority/p1 Medium priority feature that should be implemented in this version severity/s1 High impact: Logical errors or data errors that must occur
Milestone

Comments

@lignay
Copy link
Contributor

lignay commented Sep 14, 2021

Can be reproduced ?

Yes

Steps:

create table tbl_01 (col1 int, a bigint unsigned, c char(10) not null);
insert into tbl_01 values (1,1,"a");
insert into tbl_01 values (2,2,"b");
insert into tbl_01 values (2,3,"c");
insert into tbl_01 values (3,4,"E");
insert into tbl_01 values (3,5,"C");
insert into tbl_01 values (3,6,"D");
select a,c,sum(a) from tbl_01 group by a;

Expected behavior:

Succcessfully execution

Actual behavior:

ERROR 1105 (HY000): unknown error:[42000]unknown column 'c' in expr

mo-server log snippet:
2021/09/14 16:42:50.069988 +0800 INFO cmd 3
2021/09/14 16:42:50.070082 +0800 INFO query:select a,c,sum(a) from tbl_01 group by a
2021/09/14 16:42:50.071684 +0800 INFO connection id 6 , the time of handling the request 1.705458ms

Environment:

  • Version or commit-id (e.g. v0.1.0 or 8b23a93):
  • Hardware parameters:
  • OS type:
  • Others:

Configuration file:

Additional context:

  • Error message from client:
  • Server log:
  • Other information:
@lignay lignay added kind/bug Something isn't working priority/p1 Medium priority feature that should be implemented in this version needs-triage severity/s1 High impact: Logical errors or data errors that must occur labels Sep 14, 2021
@lignay lignay added this to the v0.1.0 milestone Sep 14, 2021
@lignay lignay assigned daviszhen and nnsgmsone and unassigned daviszhen Sep 14, 2021
@nnsgmsone
Copy link
Contributor

The current implementation is equivalent to sql_mode=only_full_group_by

@lignay lignay changed the title [function-sum()]ERROR 1105 (HY000): unknown error:[42000]unknown column 'c' in expr [fun-sum()]ERROR 1105 (HY000): unknown error:[42000]unknown column 'c' in expr Sep 14, 2021
@lignay lignay changed the title [fun-sum()]ERROR 1105 (HY000): unknown error:[42000]unknown column 'c' in expr [func-sum()]ERROR 1105 (HY000): unknown error:[42000]unknown column 'c' in expr Sep 14, 2021
@lignay lignay modified the milestones: v0.1.0, v0.2.0 Sep 15, 2021
@JinHai-CN JinHai-CN modified the milestones: v0.2.0, Backlog Sep 26, 2021
@JinHai-CN
Copy link
Contributor

Open question: Why we need to implement this feature?

@JinHai-CN JinHai-CN added the kind/compatibility The compatibility with mysql 8.0 should be discussed further. label Sep 26, 2021
@nnsgmsone
Copy link
Contributor

support now

@nnsgmsone nnsgmsone assigned lignay and unassigned nnsgmsone Dec 20, 2021
@lignay
Copy link
Contributor Author

lignay commented Dec 20, 2021

Fixed and added the case to BVT

@lignay lignay closed this as completed Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working kind/compatibility The compatibility with mysql 8.0 should be discussed further. needs-triage priority/p1 Medium priority feature that should be implemented in this version severity/s1 High impact: Logical errors or data errors that must occur
Projects
None yet
Development

No branches or pull requests

4 participants