We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
SQLE: v4.2502-pre1
开启规则“查询数据量超过阈值,筛选条件必须带上主键或者索引”,当审核的sql带有having子句时出现Error 1054 (42S22): Unknown column 'xxxx' in 'having clause'报错
CREATE TABLE `tb1` ( `column3` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL, `id` bigint(20) NOT NULL AUTO_INCREMENT, `column1` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL, `column2` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
SELECT sum(id) as total_amt FROM tb2 GROUP BY column1 HAVING total_amt <> 0;
在获取影响行数的时候,将select语句中的查询字段替换为数字1 (关联issue:https://github.com/actiontech/sqle/issues/2175#issuecomment-1865658820) 导致having子句的字段找不到。
The text was updated successfully, but these errors were encountered:
ColdWaterLW
No branches or pull requests
版本信息(Version)
SQLE: v4.2502-pre1
问题描述(Describe)
开启规则“查询数据量超过阈值,筛选条件必须带上主键或者索引”,当审核的sql带有having子句时出现Error 1054 (42S22): Unknown column 'xxxx' in 'having clause'报错
截图或日志(Log)
如何复现(To Reproduce)
问题原因
在获取影响行数的时候,将select语句中的查询字段替换为数字1
(关联issue:https://github.com/actiontech/sqle/issues/2175#issuecomment-1865658820)
导致having子句的字段找不到。
解决方案
变更影响面
受影响的模块或功能
外部引用的潜在问题或风险
版本兼容性
测试建议
The text was updated successfully, but these errors were encountered: