Skip to content

insert on duplicate语句不带列字段时出现空指针问题 #5005

@renliangyu857

Description

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

Ⅰ. Issue Description

不带列字段时出现空指针,如insert into t values(1,1,1) on duplicate key update a = 2;

Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:
定位到时在通过插入的数据构造前置镜像时,recognizer.getInsertColumns返回了null,在遍历时出现空指针问题;此时应该根据values构造主键查询列,参考BaseInsertExecutor#parsePKValuesFromStatement

image

Ⅲ. Describe what you expected to happen

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

  1. xxx
  2. xxx
  3. xxx

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions