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

SQLUtils.parseStatements解析PG时使用KeepSourceLocation不生效 #5287

Closed
eth33 opened this issue May 23, 2023 · 1 comment
Closed

SQLUtils.parseStatements解析PG时使用KeepSourceLocation不生效 #5287

eth33 opened this issue May 23, 2023 · 1 comment

Comments

@eth33
Copy link

eth33 commented May 23, 2023

传入KeepSourceLocation参数,解析出来的SQLObjectImpl的sourceLine和sourceColumn都还是为0。
通过debug找到原因,版本1.2.18的PGExprParser第55行,构造函数PGExprParser(String sql, SQLParserFeature... features)没有把SQLParserFeature传给PGLexer的构造函数
望修改。

@lizongbo
Copy link
Collaborator

验证确实漏传参数了,晚点我提交pr来修复

image

lizongbo added a commit to lizongbo/druid that referenced this issue Sep 30, 2023
传入参数加上 features ,mvn validate 通过,单测验证ok
wenshao pushed a commit that referenced this issue Sep 30, 2023
* 针对mysql loadbalance格式的url,加上connectTimeout等属性的识别支持 #5396

针对mysql loadbalance格式的url,加上connectTimeout等属性的识别支持 #5396
 if (jdbcUrl.startsWith("jdbc:mysql://") || jdbcUrl.startsWith("jdbc:mysql:loadbalance://")) {
配套单侧验证ok,mvn validate验证ok,mvn clean install 无新增错误

* 解决PG时使用KeepSourceLocation不生效的问题 #5287

传入参数加上 features ,mvn validate 通过,单测验证ok
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