seata mysql 带虚拟列的table在删除数据的时候,回滚失败

ndasle7k  于 5个月前  发布在  Mysql
关注(0)|答案(4)|浏览(108)

Branch session rollback failed and try again later xid = 127.0.0.1:8091:130679683661434880 branchId = 130679685964107776 The value specified for generated column 'aa' in table 'xx' is not allowed.

Ⅵ. Environment:

  • JDK version : .8
  • OS : centos 7
  • Others: seata version 1.4.1
cwxwcias

cwxwcias1#

aa 是 xx表的虚拟字段

rkkpypqq

rkkpypqq2#

sql 表结构示例贴出来

oxosxuxt

oxosxuxt3#

sql 表结构示例贴出来

CREATE TABLE cw_cust (
ID bigint(20) NOT NULL COMMENT 'ID',
CUST_ID varchar(20) DEFAULT NULL COMMENT '客户代码',
CUST_NAME varchar(100) DEFAULT NULL COMMENT '客户名称',
BILL_TYPE char(2) DEFAULT NULL COMMENT '业务类型',
BILL_NO varchar(20) DEFAULT NULL COMMENT '业务编号',
CAPITAL_AMT decimal(18,6) DEFAULT '0.000000' COMMENT '金额1',
CREDIT_AMT decimal(18,6) DEFAULT '0.000000' COMMENT '金额2',
BALANCE_AMT decimal(18,6) GENERATED ALWAYS AS ((ifnull(CAPITAL_AMT,0) + ifnull(CREDIT_AMT,0))) STORED COMMENT '余额',
PRIMARY KEY (ID) USING BTREE,
KEY idx_fund_cust (CUST_NAME)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='余额表';

33qvvth1

33qvvth14#

虚拟列使用insert语句无法插入,导致无法回滚,这个有办法区分是不是虚拟列么

相关问题