OceanBase,表创建触发器之后,无法Inert进去数据

【 使用环境 】生产环境 or 测试环境 测试环境
【 OB or 其他组件 】OceabBase_CE 4.2.1.2
【 使用版本 】OceabBase_CE 4.2.1.2
【问题描述】清晰明确描述问题
创建触发器之后,无法正常插入数据。同样创建触发器的sql和插入数据的sql放到navicate上,可以正常插入数据,且数据正确。
创建触发器的sql:
DELIMITER //
CREATE TRIGGER update_serial_id
BEFORE INSERT ON TAccountCashInOut
FOR EACH ROW
BEGIN
DECLARE max_serial_id INT;

IF NEW.FSerialId = 0 THEN
    SELECT MAX(FSerialId) INTO max_serial_id FROM TAccountCashInOut;
    SET NEW.FSerialId = IFNULL(max_serial_id, 0) + 1;
END IF;

END;
//
DELIMITER ;

插入数据的sql:
Insert Into TAccountCashInOut(FSerialId, FDate, FAccountNo) ValueS(0, “2024-04-16”, “ln”);

备注:FSerialId不是自动增加的。
【复现路径】问题出现前后相关操作
【附件及日志】推荐使用OceanBase敏捷诊断工具obdiag收集诊断信息,详情参见链接(右键跳转查看):

【SOP系列 22 】——故障诊断第一步(自助诊断和诊断信息收集)

报错 ErrorCode = 1442, SQLState = HY000, Details = Can’t update table ‘TAccountCashInOut’ in stroed function/trigger because it is already used by statement which invoked this function/trigger

无法正常插入数据有什么报错信息?
表结构也提供下。

CREATE TABLE TAccountCashInOut (
FSerialId int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘流号’,
FDate date NOT NULL COMMENT ‘日期’,
FAccountNo varchar(21) COLLATE utf8mb4_bin NOT NULL DEFAULT ‘’ COMMENT ‘客户资金账号’,
FCashInOutType char(1) COLLATE utf8mb4_bin NOT NULL DEFAULT ‘N’ COMMENT ‘出入金类型’,
FCashInOutMode char(1) COLLATE utf8mb4_bin NOT NULL DEFAULT ‘N’ COMMENT ‘出入金方式’,
FCashInOutValue decimal(38,8) NOT NULL DEFAULT ‘0.00000000’ COMMENT ‘出入金金额’,
FCashInOutRemark varchar(120) COLLATE utf8mb4_bin NOT NULL DEFAULT ‘’ COMMENT ‘出入金备注’,
FOutSerialId varchar(21) COLLATE utf8mb4_bin NOT NULL DEFAULT ‘’ COMMENT ‘外部流水号’,
FRandId int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘随机数’,
FState char(1) COLLATE utf8mb4_bin NOT NULL DEFAULT ‘N’ COMMENT ‘状态’,
FOperatorNo varchar(21) COLLATE utf8mb4_bin NOT NULL DEFAULT ‘’ COMMENT ‘操作员’,
FOperateTime timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT ‘操作时间’,
PRIMARY KEY (FSerialId, FDate, FAccountNo, FRandId, FState),
UNIQUE KEY FSerialId (FSerialId) BLOCK_SIZE 16384 GLOBAL
) DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = COMPACT COMPRESSION = ‘zstd_1.3.8’ REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0 COMMENT = ‘客户出入金表’

失败原因:
ErrorCode = 1442, SQLState = HY000, Details = Can’t update table ‘TAccountCashInOut’ in stored function/trigger because it is already used by statement which invoked this stored function/trigger.

该问题已内部复现,相关同学正在确认,请稍等。

目前不允许在触发器中访问基表,单行的insert语句会放开这个限制,但是其他类型语句这个限制会保留