From e1bbb74ca3723f6f05047674502cb410997e05ac Mon Sep 17 00:00:00 2001 From: tiancaiamao Date: Wed, 25 Nov 2020 20:34:12 +0800 Subject: [PATCH] revert changes --- executor/partition_table_test.go | 1 + executor/table_reader.go | 2 +- go.sum | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/executor/partition_table_test.go b/executor/partition_table_test.go index 40ffb17d745fa..5fbabc07e110d 100644 --- a/executor/partition_table_test.go +++ b/executor/partition_table_test.go @@ -215,6 +215,7 @@ partition p3 values less than maxvalue)`) func (s *partitionTableSuite) TestSelectLockOnPartitionTable(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") + tk.MustExec("drop table if exists pt") tk.MustExec(`create table pt (id int primary key, k int, c int, index(k)) partition by range (id) ( partition p0 values less than (4), diff --git a/executor/table_reader.go b/executor/table_reader.go index 2938c3321b9ad..243386d0b505e 100644 --- a/executor/table_reader.go +++ b/executor/table_reader.go @@ -217,7 +217,7 @@ func (e *TableReaderExecutor) Next(ctx context.Context, req *chunk.Chunk) error // add the partition ID as an extra column. The SelectLockExec need this information // to construct the lock key. physicalID := getPhysicalTableID(e.table) - if physicalID != e.table.Meta().ID && e.extraPIDColumnIndex.valid() { + if e.extraPIDColumnIndex.valid() { fillExtraPIDColumn(req, e.extraPIDColumnIndex.value(), physicalID) } diff --git a/go.sum b/go.sum index 67d3c5ee10c1b..6dcae737f5e0a 100644 --- a/go.sum +++ b/go.sum @@ -775,6 +775,7 @@ github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrY github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sergi/go-diff v1.0.1-0.20180205163309-da645544ed44 h1:tB9NOR21++IjLyVx3/PCPhWMwqGNCMQEH96A6dMZ/gc= github.com/sergi/go-diff v1.0.1-0.20180205163309-da645544ed44/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v2.19.10+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v2.20.3+incompatible h1:0JVooMPsT7A7HqEYdydp/OfjSOYSjhXV7w1hkKj/NPQ=