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

在 DB2 数据库 INTERVAL 表达式输出时,将 VALUE 用括号包装 #4838

Merged
merged 1 commit into from
Aug 1, 2022

Conversation

abomb4
Copy link
Contributor

@abomb4 abomb4 commented Jun 19, 2022

修复打印 DB2 的 SQL 时,INTERVAL 输出不正确的问题。
以原始 SQL 为说明:
INSERT INTO test VALUES (1, CURRENT TIMESTAMP + (10 * 60) SECONDS)
修复前输出:
INSERT INTO test VALUES (1, CURRENT TIMESTAMP + 10 * 60 SECONDS)
这个语句是不能用的,会报“SQLCODE=-182, SQLSTATE=42816”。
修复后输出为:
INSERT INTO test VALUES (1, CURRENT TIMESTAMP + (10 * 60) SECONDS)

可使用 IBM 官方的 DB2 Docker 镜像进行快速验证。(https://hub.docker.com/r/ibmcom/db2)

@wenshao wenshao merged commit 117ade4 into alibaba:master Aug 1, 2022
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

Successfully merging this pull request may close these issues.

2 participants