在执行sql时,会出现错误:Fail to get auto-generated keys, use 'SELECT LAST_INSERT_ID()' instead. Be cautious, statement could be polluted. Recommend you set the statement to return generated keys.
环境seata 1.4.2 jdk 1.8 springboot 2.3.12.RELEASE 主键为自增
在执行sql时,会出现错误:Fail to get auto-generated keys, use 'SELECT LAST_INSERT_ID()' instead. Be cautious, statement could be polluted. Recommend you set the statement to return generated keys.
环境seata 1.4.2 jdk 1.8 springboot 2.3.12.RELEASE 主键为自增
数据库版本 driver版本
数据库版本 mysql 5.7.37-log mysql-connector版本 6.0.6 数据源类型 com.alibaba.druid.pool.DruidDataSource 依赖版本 druid-spring-boot-starter 1.1.10
undolog的id字段有没有去掉?
在建表的时候就没有id字段
CREATE TABLE undo_log
(
branch_id
bigint(20) NOT NULL COMMENT 'branch transaction id',
xid
varchar(128) NOT NULL COMMENT 'global transaction id',
context
varchar(128) NOT NULL COMMENT 'undo_log context,such as serialization',
rollback_info
longblob NOT NULL COMMENT 'rollback info',
log_status
int(11) NOT NULL COMMENT '0:normal status,1:defense status',
log_created
datetime(6) NOT NULL COMMENT 'create datetime',
log_modified
datetime(6) NOT NULL COMMENT 'modify datetime',
UNIQUE KEY ux_undo_log
(xid
,branch_id
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='AT transaction mode undo table'
driver换成5.1.47试试