Skip to content

Commit

Permalink
cherry pick #19562 to release-4.0 (#19895)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-srebot authored Sep 9, 2020
1 parent f9bc29b commit 125258b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion store/tikv/region_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ func (c *RegionCache) LoadRegionsInKeyRange(bo *Backoffer, startKey, endKey []by
}
regions = append(regions, batchRegions...)
endRegion := batchRegions[len(batchRegions)-1]
if endRegion.Contains(endKey) {
if endRegion.ContainsByEnd(endKey) {
break
}
startKey = endRegion.EndKey()
Expand Down
3 changes: 3 additions & 0 deletions table/tables/tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,9 @@ func (t *TableCommon) RemoveRecord(ctx sessionctx.Context, h int64, r []types.Da
}
err = t.addDeleteBinlog(ctx, binlogRow, colIDs)
}
if ctx.GetSessionVars().TxnCtx == nil {
return nil
}
colSize := make(map[int64]int64, len(t.Cols()))
sc := ctx.GetSessionVars().StmtCtx
for id, col := range t.Cols() {
Expand Down

0 comments on commit 125258b

Please sign in to comment.