mysql com.alibaba.druid.filter.stat.StatFilter ParserException

zzwlnbp8  于 2021-11-27  发布在  Java
关注(0)|答案(2)|浏览(566)

INSERT INTO execute_time_processor (type, relation_id, time_out)
(
SELECT
#{type} ,#{relationId},
DATE_ADD(
NOW(),
INTERVAL (
SELECT
MINUTE
FROM
execute_time_config
WHERE
type = #{type}
) MINUTE
)
FROM
DUAL
) ON DUPLICATE KEY UPDATE time_out = DATE_ADD(
NOW(),
INTERVAL (
SELECT
MINUTE
FROM
execute_time_config
WHERE
type = #{type}
) MINUTE
)

在mysql服务器中运行正常,但是日志有ERROR输出,输出信息为

2fjabf4q

2fjabf4q1#

19/08/15 16:40:04 ERROR callSkuSync-3-thread-3 com.alibaba.druid.filter.stat.StatFilter: merge sql error, dbType mysql, sql :
INSERT INTO execute_time_processor (type, relation_id, time_out) ( SELECT ? ,?, DATE_ADD( NOW(), INTERVAL ( SELECT MINUTE FROM execute_time_config WHERE type = ? ) MINUTE ) FROM DUAL ) ON DUPLICATE KEY UPDATE time_out = DATE_ADD( NOW(), INTERVAL ( SELECT MINUTE FROM execute_time_config WHERE type = ? ) MINUTE )
com.alibaba.druid.sql.parser.ParserException: syntax error, expect RPAREN, actual IDENTIFIER MINUTE
at com.alibaba.druid.sql.parser.SQLExprParser.accept(SQLExprParser.java:1531) ~[druid-1.0.16.jar:1.0.16]
at com.alibaba.druid.sql.parser.SQLExprParser.methodRest(SQLExprParser.java:714) ~[druid-1.0.16.jar:1.0.16]
at com.alibaba.druid.sql.parser.SQLExprParser.primaryRest(SQLExprParser.java:679) ~[druid-1.0.16.jar:1.0.16]

iyr7buue

iyr7buue2#

能把你的数据schema,和少量数据脚本发出来么,我可以调试下

相关问题