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

MySQL增加ONLY_FULL_GROUP_BY规则 #2955

Open
littleniannian opened this issue Mar 7, 2025 · 0 comments
Open

MySQL增加ONLY_FULL_GROUP_BY规则 #2955

littleniannian opened this issue Mar 7, 2025 · 0 comments
Assignees

Comments

@littleniannian
Copy link
Collaborator

需求描述(Describe)

客户反馈在MySQL数据库中存在一些违反ONLY_FULL_GROUP_BY的SQL,影响查询结果,有不准的风险。

  1. 显式GROUP BY,所有非聚合列都需要包含在GROUP BY的后面。
  2. 隐式DISTINCT,使用distinct的时候MYSQL会进行隐式的分组,因为DISTINCT需要确保每个组合的唯一性。

实现方案

变更影响面

受影响的模块或功能

外部引用的潜在问题或风险

版本兼容性

测试建议

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants