INSERT INTO execute_time_processor (type, relation_id, time_out)
(
SELECT
#{type} ,#{relationId},
DATE_ADD(
NOW(),
INTERVAL (
SELECTMINUTE
FROMexecute_time_config
WHEREtype
= #{type}
) MINUTE
)
FROM
DUAL
) ON DUPLICATE KEY UPDATE time_out
= DATE_ADD(
NOW(),
INTERVAL (
SELECTMINUTE
FROMexecute_time_config
WHEREtype
= #{type}
) MINUTE
)
在mysql服务器中运行正常,但是日志有ERROR输出,输出信息为
2条答案
按热度按时间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
FROMexecute_time_config
WHEREtype
= ? ) MINUTE ) FROM DUAL ) ON DUPLICATE KEY UPDATEtime_out
= DATE_ADD( NOW(), INTERVAL ( SELECTMINUTE
FROMexecute_time_config
WHEREtype
= ? ) 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]
iyr7buue2#
能把你的数据schema,和少量数据脚本发出来么,我可以调试下