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

[BUG] 达梦数据库SQL带有DATE的时间设置脚本解析异常。 #6220

Open
ifangta opened this issue Nov 6, 2024 · 0 comments
Open

Comments

@ifangta
Copy link

ifangta commented Nov 6, 2024

Database Type

达梦数据库

Database Version

达梦V8

Druid Version

1.2.23

JDK Version

JDK8

Error SQL

UPDATE TEST_TABLE SET SQLDATE = DATE'2022-02-02' WHERE TEST_ID = 1

Testcase Code

String sql="UPDATE TEST_TABLE SET SQLDATE = DATE'2022-02-02' WHERE TEST_ID = 1";
try {
List sqlStatements = SQLUtils.parseStatements(sql, DbType.dm);
System.out.println(sqlStatements.size());
}catch(Exception e) {
e.printStackTrace();
}

Stacktrace Info

com.alibaba.druid.sql.parser.ParserException: not supported.pos 48, line 1, column 37, token LITERAL_CHARS 2022-02-02
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:654)
at com.alibaba.druid.sql.SQLUtils.parseStatements(SQLUtils.java:600)
at com.alibaba.druid.sql.SQLUtils.parseStatements(SQLUtils.java:621)
at com.druid.SqlParseTest.testDaMengInsert(SqlParseTest.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)

Error Info

com.alibaba.druid.sql.parser.ParserException: not supported.pos 48, line 1, column 37, token LITERAL_CHARS 2022-02-02

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