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

FD loss in nested left join #34148

Closed
AilinKid opened this issue Apr 21, 2022 · 1 comment · Fixed by #34147
Closed

FD loss in nested left join #34148

AilinKid opened this issue Apr 21, 2022 · 1 comment · Fixed by #34147
Assignees
Labels
affects-6.0 severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@AilinKid
Copy link
Contributor

AilinKid commented Apr 21, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Meta

create table customer1(pk int primary key, a int);
create table customer2(pk int primary key, b int);

Query

select c1.a, count(*) from customer2 c3 left join (customer1 c1 left join customer2 c2 on c1.a=c2.b) on c3.b=c1.a where c2.pk in (7,9) group by c2.b;

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

Empty set (0.01 sec)

3. What did you see instead (Required)

ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'test.c1.a' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

4. What is your TiDB version? (Required)

master

@AilinKid AilinKid added the type/bug The issue is confirmed as a bug. label Apr 21, 2022
@AilinKid AilinKid self-assigned this Apr 21, 2022
@ChenPeng2013 ChenPeng2013 added affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 labels Apr 24, 2022
@AilinKid AilinKid removed affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. labels Apr 28, 2022
@AilinKid
Copy link
Contributor Author

FD is introduced only in 6.0 and latter version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.0 severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants