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

带有union关键字的查询,返回结果中errmsg显示列不存在,但返回结果中query_tree是正确的 #2807

Open
hhw007 opened this issue Sep 13, 2024 · 1 comment

Comments

@hhw007
Copy link
Contributor

hhw007 commented Sep 13, 2024

重现步骤

goInception的版本为v1.3.0-76-g4082e7a-dirty,这个版本应该已经兼容了带有union关键字的查询,但查询返回结果中errmsg列显示Column 'c.name' not existed,但返回结果中query_tree是正确的,由于sql\engines\goinception.py的218行会对返回结果中errmsg列做是否为空的判断,由于不为空,导致抛出错误。

手动执行查询操作流程:
image

预期外的结果

报错详情如下:
[2024-09-13 14:59:15,322][Thread-48:139750267365120][task_id:default][data_masking.py:56][WARNING]- 数据脱敏异常,错误信息:Traceback (most recent call last):
File "/archery/Archery-1.9.1/sql/utils/data_masking.py", line 28, in data_masking
select_list = inception_engine.query_data_masking(
File "/archery/Archery-1.9.1/sql/engines/goinception.py", line 211, in query_data_masking
raise RuntimeError(f'Inception Error: {print_info.get("errmsg")}')
RuntimeError: Inception Error: Column 'c.name' not existed.

日志文本

No response

版本

1.9.1

部署方式

手工部署

是否还有其他可以辅助定位问题的信息?比如数据库版本等

生产MySQL版本: 5.6.16
备份库MySQL版本:5.7.43
Browsers: Chrome
goInception: v1.3.0-76

@hhw007
Copy link
Contributor Author

hhw007 commented Sep 13, 2024

是否可以修改sql\engines\goinception.py的218行处的判断逻辑,只要query_tree不为空,就返回query_tree,query_tree为空则抛出错误?

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

1 participant