Skip to content

00218规则优化 #2959

New issue

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

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

Already on GitHub? # to your account

Open
waterdrink opened this issue Mar 10, 2025 · 0 comments
Open

00218规则优化 #2959

waterdrink opened this issue Mar 10, 2025 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@waterdrink
Copy link
Collaborator

版本信息(Version)

v4.25.02

问题描述(Describe)

MySQL00218规则在判断时需要考虑sql语句中使用最左列的多列情况,如

CREATE TABLE SQLE00218_t1_customers (
 id INT(11) NOT NULL,\n name VARCHAR(32) DEFAULT '',
 sex TINYINT NOT NULL,\n city VARCHAR(32) NOT NULL,
 age SMALLINT(4) NOT NULL,\n PRIMARY KEY (id),
 INDEX idx_name_age_customers (name, age)
 )
SELECT name, sex, COUNT(*) FROM SQLE00218_t1_customers GROUP BY name, age

期望不触发00218规则。
期望检查其他数据库类型的00218规则实现是否也需要类似修正。

截图或日志(Log)

如何复现(To Reproduce)

问题原因

解决方案

变更影响面

受影响的模块或功能

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

版本兼容性

测试建议

@waterdrink waterdrink added the bug Something isn't working label Mar 10, 2025
@ColdWaterLW ColdWaterLW added this to the v4.2503.0 milestone Mar 10, 2025
@ColdWaterLW ColdWaterLW modified the milestones: v4.2503.0, 4.2504.0 Mar 26, 2025
@ColdWaterLW ColdWaterLW modified the milestones: v4.2504.0, v4.2505.0 Apr 21, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants