[ERROR] [com.alibaba.druid.filter.stat.StatFilter] - merge sql error? 400 报错
@wenshao 你好,请问下这个问题有计划在新版本里面修复吗:
1) druid版本号:0.2.12
2) 产生错误的SQL:
select COUNT(id) from log where
ctime>ADDDATE(NOW(),INTERVAL -? HOUR) and
result='yes' and
notify_result='n' and
notify_count>?
3)错误日志:
[ERROR] [com.alibaba.druid.filter.stat.StatFilter] - merge sql error, dbType mysql, sql :
select COUNT(id) from log where
ctime>ADDDATE(NOW(),INTERVAL -? HOUR) and
result='yes' and
notify_result='n' and
notify_count>?
com.alibaba.druid.sql.parser.ParserException: TODO
at com.alibaba.druid.sql.parser.SQLExprParser.primary(SQLExprParser.java:339)
at com.alibaba.druid.sql.dialect.mysql.parser.MySqlExprParser.primary(MySqlExprParser.java:170)
at com.alibaba.druid.sql.parser.SQLExprParser.expr(SQLExprParser.java:87)
at com.alibaba.druid.sql.dialect.mysql.parser.MySqlExprParser.parseInterval(MySqlExprParser.java:480)
at com.alibaba.druid.sql.parser.SQLExprParser.primary(SQLExprParser.java:400)
at com.alibaba.druid.sql.dialect.mysql.parser.MySqlExprParser.primary(MySqlExprParser.java:170)
at com.alibaba.druid.sql.parser.SQLExprParser.expr(SQLExprParser.java:87)
at com.alibaba.druid.sql.parser.SQLExprParser.exprList(SQLExprParser.java:621)
at com.alibaba.druid.sql.parser.SQLExprParser.methodRest(SQLExprParser.java:531)
at com.alibaba.druid.sql.parser.SQLExprParser.primaryRest(SQLExprParser.java:499)
at com.alibaba.druid.sql.dialect.mysql.parser.MySqlExprParser.primaryRest(MySqlExprParser.java:458)
at com.alibaba.druid.sql.parser.SQLExprParser.primary(SQLExprParser.java:460)
at com.alibaba.druid.sql.dialect.mysql.parser.MySqlExprParser.primary(MySqlExprParser.java:170)
at com.alibaba.druid.sql.parser.SQLExprParser.multiplicative(SQLExprParser.java:129)
at com.alibaba.druid.sql.parser.SQLExprParser.additive(SQLExprParser.java:867)
at com.alibaba.druid.sql.parser.SQLExprParser.shift(SQLExprParser.java:895)
at com.alibaba.druid.sql.parser.SQLExprParser.bitAnd(SQLExprParser.java:777)
at com.alibaba.druid.sql.parser.SQLExprParser.bitOr(SQLExprParser.java:791)
at com.alibaba.druid.sql.parser.SQLExprParser.relationalRest(SQLExprParser.java:1006)
at com.alibaba.druid.sql.dialect.mysql.parser.MySqlExprParser.relationalRest(MySqlExprParser.java:83)
at com.alibaba.druid.sql.parser.SQLExprParser.exprRest(SQLExprParser.java:104)
at com.alibaba.druid.sql.parser.SQLExprParser.expr(SQLExprParser.java:93)
at com.alibaba.druid.sql.parser.SQLSelectParser.expr(SQLSelectParser.java:398)
at com.alibaba.druid.sql.parser.SQLSelectParser.parseWhere(SQLSelectParser.java:213)
at com.alibaba.druid.sql.dialect.mysql.parser.MySqlSelectParser.query(MySqlSelectParser.java:184)
at com.alibaba.druid.sql.parser.SQLSelectParser.select(SQLSelectParser.java:59)
at com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseSelect(MySqlStatementParser.java:184)
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:86)
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:70)
at com.alibaba.druid.sql.visitor.ParameterizedOutputVisitorUtils.parameterize(ParameterizedOutputVisitorUtils.java:41)
at com.alibaba.druid.filter.stat.StatFilter.mergeSql(StatFilter.java:145)
at com.alibaba.druid.filter.stat.StatFilter.createSqlStat(StatFilter.java:627)
at com.alibaba.druid.filter.stat.StatFilter.statementPrepareAfter(StatFilter.java:305)
at com.alibaba.druid.filter.FilterEventAdapter.connection_prepareStatement(FilterEventAdapter.java:124)
at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:446)
at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.prepareStatement(ConnectionProxyImpl.java:342)
at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:319)
我在0.2.23版本中发现这个问题已经修复了。######
0.2.23版本问题还存在么?
http://repo1.maven.org/maven2/com/alibaba/druid/0.2.23/
######试过了,可以了,多谢!版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。