Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INSERT语句错误触发规则不支持回滚 INSERT 没有指定主键的语句 #2613

Open
LordofAvernus opened this issue Sep 18, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@LordofAvernus
Copy link
Collaborator

LordofAvernus commented Sep 18, 2024

版本信息(Version)

3.2408.0

问题描述(Describe)

指定主键执行INSERT 语句时,错误提示不支持回滚 INSERT 没有指定主键的语句

截图或日志(Log)

408628f3-cf4a-4e22-a911-3eb56c0e2433

如何复现(To Reproduce)

  1. 构建样例表

CREATE TABLE dms_rel.tb_test_l (
id int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
COUPON_ID int NULL COMMENT '优惠券ID',
ORDER_TYPE varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '订单类型',
PRODUCT_SUBTYPE varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '产品子类型',
CREATE_TIME timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_USER varchar(30) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
MODIFY_TIME timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
MODIFY_USER varchar(30) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人',
PRIMARY KEY (ID),
KEY IDX_COUPID (COUPON_ID)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

  1. 确保规则
    image

  2. 审核问题语句
    INSERT INTO dms_rel.tb_test_l(id,COUPON_ID, ORDER_TYPE,MODIFY_TIME,MODIFY_USER) VALUES(10149,10048,1,'2019-09-05 19:51:43',NULL);

INSERT INTO dms_rel.tb_test_l(COUPON_ID,ORDER_TYPE,MODIFY_TIME,MODIFY_USER) VALUES(10149,1,'2019-09-11 14:03:27',NULL);

INSERT INTO dms_rel.tb_test_l VALUES (10152,10049,1,NULL,'2019-09-1114:03:27',NULL,'2019-09-11 14:03:27',NULL);

问题原因

69bf04b2-c8cd-4c40-8ba0-13014ecdfc97

解决方案

变更影响面

受影响的模块或功能

外部引用的潜在问题或风险

版本兼容性

测试建议

@LordofAvernus LordofAvernus added the bug Something isn't working label Sep 18, 2024
@LordofAvernus LordofAvernus changed the title INSERT语句触发错误规则不支持回滚 INSERT 没有指定主键的语句 INSERT语句错误触发规则不支持回滚 INSERT 没有指定主键的语句 Sep 18, 2024
@ColdWaterLW ColdWaterLW added this to the v3.2410.0 milestone Oct 14, 2024
@ColdWaterLW ColdWaterLW modified the milestones: v3.2410.0, v3.2411.0 Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants