版本升级时,联调测试出现如下错误:
The error occurred while setting parameters
SQL: delete from tenant_token where user_id IN ( ? )
Cause: java.sql.SQLException: Statement violates GTID consistency: Updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.
; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1785]; Statement violates GTID consistency: Updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.; nested exception is java.sql.SQLException: Statement violates GTID consistency: Updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transaction
MySQL问题:perror(1875),Statement violates GTID consistency
最新推荐文章于 2024-09-01 22:29:29 发布
在版本升级的联调测试中遇到错误1875,问题源于同一SQL语句中混合操作了非事务表和事务表。通过模拟测试发现,更新非事务表(如MyISAM)需在autocomitted或单语句事务中进行,不能与事务表(如InnoDB)的操作混用。在将非事务表引擎更改为InnoDB后,问题得到解决。
摘要由CSDN通过智能技术生成