-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
H2数据库 Merge 语法解析异常 #1942
Milestone
Comments
目前对h2的语法支持不够好,主要是这个数据库使用不够广泛 |
wenshao
added a commit
that referenced
this issue
Sep 10, 2017
@wenshao 请教大师,能否通过某种方式关闭 H2 中对 merge 或者其他SQL中 语法解析失败的检测? |
已经支持,会尽快预计在10月1日国庆期间会发布新版本 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
2017-09-01 20:12:08 INFO [com.alibaba.druid.pool.DruidDataSource] com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:854)- {dataSource-1} inited
2017-09-01 20:12:08 DEBUG [org.springframework.jdbc.core.JdbcTemplate] org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:505)- Executing SQL update [merge into person key(id) select * from person_test]
2017-09-01 20:12:08 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:110)- Fetching JDBC Connection from DataSource
2017-09-01 20:12:09 ERROR [com.alibaba.druid.filter.stat.StatFilter] com.alibaba.druid.filter.stat.StatFilter.mergeSql(StatFilter.java:148)- merge sql error, dbType h2, sql : merge into person key(id) select * from person_test
com.alibaba.druid.sql.parser.ParserException: syntax error, error in :'erge into person key(id) select * f',expect IDENTIFIER, actual IDENTIFIER pos 5, line 1, column 6, token IDENTIFIER into
at com.alibaba.druid.sql.parser.SQLParser.printError(SQLParser.java:280)
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:385)
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:78)
at com.alibaba.druid.sql.visitor.ParameterizedOutputVisitorUtils.parameterize(ParameterizedOutputVisitorUtils.java:43)
at com.alibaba.druid.filter.stat.StatFilter.mergeSql(StatFilter.java:146)
at com.alibaba.druid.filter.stat.StatFilter.createSqlStat(StatFilter.java:634)
at com.alibaba.druid.filter.stat.StatFilter.internalBeforeStatementExecute(StatFilter.java:402)
at com.alibaba.druid.filter.stat.StatFilter.statementExecuteUpdateBefore(StatFilter.java:330)
at com.alibaba.druid.filter.FilterEventAdapter.statement_executeUpdate(FilterEventAdapter.java:324)
at com.alibaba.druid.filter.FilterChainImpl.statement_executeUpdate(FilterChainImpl.java:2486)
at com.alibaba.druid.proxy.jdbc.StatementProxyImpl.executeUpdate(StatementProxyImpl.java:241)
at com.alibaba.druid.pool.DruidPooledStatement.executeUpdate(DruidPooledStatement.java:243)
at org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:509)
at org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:1)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:519)
at nari.test.redisson.DuridH2Test.executeNonQuery(DuridH2Test.java:48)
at nari.test.redisson.DuridH2Test.main(DuridH2Test.java:56)
2017-09-01 20:12:09 DEBUG [org.springframework.jdbc.core.JdbcTemplate] org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:511)- SQL update affected 8 rows
2017-09-01 20:12:09 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] org.springframework.jdbc.datasource.DataSourceUtils.doReleaseConnection(DataSourceUtils.java:332)- Returning JDBC Connection to DataSource
The text was updated successfully, but these errors were encountered: