Skip to content

复合主建自增表结构,插入多行数据且未携带主键值时执行异常 #5043

Open
@renliangyu857

Description

@renliangyu857
  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:

Just paste your stack trace here!

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

表结构:
CREATE TABLE t_multi_primary (
id1 int(11) NOT NULL AUTO_INCREMENT,
id2 int(11) NOT NULL,
a int(11) DEFAULT NULL,
b int(11) DEFAULT NULL,
PRIMARY KEY (id1,id2)
) ENGINE=InnoDB;
测试case语句:
insert into t_multi_primary(id1,id2,a,b) values(null,2,1,1),(null,3,2,2)
问题原因:
image
获取自增主键时,两行数据应该是两个自增主键值,但在复合主键下只获取到了一个

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • JDK version :
  • Seata version:
  • OS :
  • Others:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugCategory issues or prs related to bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions