MySQL问题:perror(1875),Statement violates GTID consistency

在版本升级的联调测试中遇到错误1875,问题源于同一SQL语句中混合操作了非事务表和事务表。通过模拟测试发现,更新非事务表(如MyISAM)需在autocomitted或单语句事务中进行,不能与事务表(如InnoDB)的操作混用。在将非事务表引擎更改为InnoDB后,问题得到解决。
摘要由CSDN通过智能技术生成

版本升级时,联调测试出现如下错误:
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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值