GitHub user IOSMainstay created a discussion: MySQL 保留字 desc  使用`desc` 
新增数据时,多服务间处理有问题,单独调用新增数据是正常的

比如:接口单独调用查询数据:select `desc` from a  接口正常
若从其他服务跳转过来或者执行查询操作:MyBatis 打印的SQL语句为:select `desc` from a,实际会提示desc from `a` 
错误;详细如下

 UPDATE `Gift_Alcohol_Receiving_Line_1ntrjxro` SET `sys_update_user` = ? , 
`item_code` = ? , `note` = ? , `update_time` = ? , `amount` = ? , `quantity` = 
? , `return_quantity` = ? , `um` = ? , `unit_price` = ? , `desc` = ? WHERE 
`uid` = ? ; UPDATE `Gift_Alcohol_Receiving_Line_1ntrjxro` SET `sys_update_user` 
= ? , `item_code` = ? , `note` = ? , `update_time` = ? , `amount` = ? , 
`quantity` = ? , `return_quantity` = ? , `um` = ? , `unit_price` = ? , `desc` = 
? WHERE `uid` = ? ;
 execute executeAutoCommitTrue error:You have an error in your SQL syntax; 
check the manual that corresponds to your MySQL server version for the right 
syntax to use near 'desc FROM `Gift_Alcohol_Receiving_Line_1ntrjxro` WHERE (id) 
in ( (502),(501) )' at line 1
[2025-11-10 
15:20:36.147][10.79.247.33][baiteda-app-runtime][DEBUG][http-nio-8805-exec-81][c.b.b.r.r.d.m.D.batchUpdate.?-?][852545a54c574808b2f0b6d7a9d147eb]-[ceramicscn]:==>
 Parameters: P8448666(String), G000162(String), (String), 2025-11-10 
15:20:36.144(Timestamp), 750(BigDecimal), 5(BigDecimal), 0(BigDecimal), 
个(String), 150(BigDecimal), 电脑双肩包(String), 
daa7da87b6444111a9611478ab542369(String), P8448666(String), G000092(String), 
(String), 2025-11-10 15:20:36.144(Timestamp), 237.5(BigDecimal), 5(BigDecimal), 
0(BigDecimal), 个(String), 47.5(BigDecimal), 西普咖啡杯(String), 
c6e186ea61de420e9489343984e80537(String)
[2025-11-10 
15:20:36.157][10.79.247.33][baiteda-app-runtime][ERROR][http-nio-8805-exec-81][o.a.s.r.d.e.AbstractDMLBaseExecutor.?-?][852545a54c574808b2f0b6d7a9d147eb]-[ceramicscn]:execute
 executeAutoCommitTrue error:You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right syntax to 
use near 'desc FROM `Gift_Alcohol_Receiving_Line_1ntrjxro` WHERE (id) in ( 
(502),(501) )' at line 1
java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check 
the manual that corresponds to your MySQL server version for the right syntax 
to use near 'desc FROM `Gift_Alcohol_Receiving_Line_1ntrjxro` WHERE (id) in ( 
(502),(501) )' at line 1
        at 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:121)
        at 
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
        at 
com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:912)
        at 
com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:968)
        at 
com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
        at 
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
        at 
org.apache.seata.rm.datasource.exec.MultiUpdateExecutor.afterImage(MultiUpdateExecutor.java:135)
        at 
org.apache.seata.rm.datasource.exec.MultiExecutor.afterImage(MultiExecutor.java:123)
        at 
org.apache.seata.rm.datasource.exec.AbstractDMLBaseExecutor.executeAutoCommitFalse(AbstractDMLBaseExecutor.java:100)
--
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
        at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:398)
        at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
        at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:903)
        at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1769)
        at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1189)
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:658)
        at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
        at java.base/java.lang.Thread.run(Thread.java:840)
[2025-11-10 
15:20:36.159][10.79.247.33][baiteda-app-runtime][ERROR][http-nio-8805-exec-81][c.b.b.r.r.b.s.d.s.MysqlTableStrategy.?-?][852545a54c574808b2f0b6d7a9d147eb]-[ceramicscn]:批量修改失败
 

GitHub link: https://github.com/apache/incubator-seata/discussions/7775

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to