From f45f4978a10a4b94734650805aa5be41f9fb5838 Mon Sep 17 00:00:00 2001 From: xiongjiwei Date: Fri, 14 Oct 2022 00:07:51 +0800 Subject: [PATCH] mockkv: make pk id = -1 if no primary key column is used (#38443) --- store/mockstore/unistore/cophandler/cop_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store/mockstore/unistore/cophandler/cop_handler.go b/store/mockstore/unistore/cophandler/cop_handler.go index 5f375f2bfdc30..2b32c168329bd 100644 --- a/store/mockstore/unistore/cophandler/cop_handler.go +++ b/store/mockstore/unistore/cophandler/cop_handler.go @@ -401,7 +401,7 @@ func newRowDecoder(columnInfos []*tipb.ColumnInfo, fieldTps []*types.FieldType, if primaryCols != nil { pkCols = primaryCols } else { - pkCols = []int64{0} + pkCols = []int64{-1} } } def := func(i int, chk *chunk.Chunk) error {