Skip to content

Commit

Permalink
Merge branch 'master' into fixBRGlueDDL
Browse files Browse the repository at this point in the history
  • Loading branch information
lichunzhu authored Mar 4, 2021
2 parents 9f65c01 + 5f73c82 commit f1c54ba
Show file tree
Hide file tree
Showing 303 changed files with 5,608 additions and 2,192 deletions.
2 changes: 1 addition & 1 deletion .build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ task DownloadLinter -If (-not (Test-Path $tools.Linter.Path)) {
}

task RunLinter DownloadLinter, {
exec { & $tools.Linter.Path run -v --disable-all --deadline=3m --enable=misspell --enable=ineffassign $directories }
exec { & $tools.Linter.Path run -v --disable-all --deadline=3m --enable=misspell --enable=ineffassign --enable=varcheck $directories }
}

task GoModTidy {
Expand Down
11 changes: 1 addition & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,10 @@ gosec:tools/bin/gosec
tools/bin/gosec $$($(PACKAGE_DIRECTORIES))

check-static: tools/bin/golangci-lint
@git fetch https://github.com/pingcap/tidb
tools/bin/golangci-lint run -v --disable-all --deadline=5m \
tools/bin/golangci-lint run -v --disable-all --deadline=3m \
--enable=misspell \
--enable=ineffassign \
--enable=deadcode \
--enable=errcheck \
--enable=gosimple \
--enable=staticcheck \
--enable=typecheck \
--enable=unused \
--enable=varcheck \
--enable=structcheck \
--new-from-rev=FETCH_HEAD \
$$($(PACKAGE_DIRECTORIES))

check-slow:tools/bin/gometalinter tools/bin/gosec
Expand Down
32 changes: 22 additions & 10 deletions bindinfo/bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ import (
func TestT(t *testing.T) {
CustomVerboseFlag = true
logLevel := os.Getenv("log_level")
logutil.InitLogger(logutil.NewLogConfig(logLevel, logutil.DefaultLogFormat, "", logutil.EmptyFileLogConfig, false))
err := logutil.InitLogger(logutil.NewLogConfig(logLevel, logutil.DefaultLogFormat, "", logutil.EmptyFileLogConfig, false))
if err != nil {
t.Fatal(err)
}
autoid.SetStep(5000)
TestingT(t)
}
Expand Down Expand Up @@ -375,9 +378,11 @@ func (s *testSuite) TestGlobalBinding(c *C) {
}

pb := &dto.Metric{}
metrics.BindTotalGauge.WithLabelValues(metrics.ScopeGlobal, bindinfo.Using).Write(pb)
err = metrics.BindTotalGauge.WithLabelValues(metrics.ScopeGlobal, bindinfo.Using).Write(pb)
c.Assert(err, IsNil)
c.Assert(pb.GetGauge().GetValue(), Equals, float64(1))
metrics.BindMemoryUsage.WithLabelValues(metrics.ScopeGlobal, bindinfo.Using).Write(pb)
err = metrics.BindMemoryUsage.WithLabelValues(metrics.ScopeGlobal, bindinfo.Using).Write(pb)
c.Assert(err, IsNil)
c.Assert(pb.GetGauge().GetValue(), Equals, testSQL.memoryUsage)

sql, hash := normalizeWithDefaultDB(c, testSQL.querySQL, "test")
Expand Down Expand Up @@ -432,9 +437,11 @@ func (s *testSuite) TestGlobalBinding(c *C) {
bindData = s.domain.BindHandle().GetBindRecord(hash, sql, "test")
c.Check(bindData, IsNil)

metrics.BindTotalGauge.WithLabelValues(metrics.ScopeGlobal, bindinfo.Using).Write(pb)
err = metrics.BindTotalGauge.WithLabelValues(metrics.ScopeGlobal, bindinfo.Using).Write(pb)
c.Assert(err, IsNil)
c.Assert(pb.GetGauge().GetValue(), Equals, float64(0))
metrics.BindMemoryUsage.WithLabelValues(metrics.ScopeGlobal, bindinfo.Using).Write(pb)
err = metrics.BindMemoryUsage.WithLabelValues(metrics.ScopeGlobal, bindinfo.Using).Write(pb)
c.Assert(err, IsNil)
// From newly created global bind handle.
c.Assert(pb.GetGauge().GetValue(), Equals, testSQL.memoryUsage)

Expand Down Expand Up @@ -482,9 +489,11 @@ func (s *testSuite) TestSessionBinding(c *C) {
}

pb := &dto.Metric{}
metrics.BindTotalGauge.WithLabelValues(metrics.ScopeSession, bindinfo.Using).Write(pb)
err = metrics.BindTotalGauge.WithLabelValues(metrics.ScopeSession, bindinfo.Using).Write(pb)
c.Assert(err, IsNil)
c.Assert(pb.GetGauge().GetValue(), Equals, float64(1))
metrics.BindMemoryUsage.WithLabelValues(metrics.ScopeSession, bindinfo.Using).Write(pb)
err = metrics.BindMemoryUsage.WithLabelValues(metrics.ScopeSession, bindinfo.Using).Write(pb)
c.Assert(err, IsNil)
c.Assert(pb.GetGauge().GetValue(), Equals, testSQL.memoryUsage)

handle := tk.Se.Value(bindinfo.SessionBindInfoKeyType).(*bindinfo.SessionHandle)
Expand Down Expand Up @@ -530,9 +539,11 @@ func (s *testSuite) TestSessionBinding(c *C) {
c.Check(bindData.OriginalSQL, Equals, testSQL.originSQL)
c.Check(len(bindData.Bindings), Equals, 0)

metrics.BindTotalGauge.WithLabelValues(metrics.ScopeSession, bindinfo.Using).Write(pb)
err = metrics.BindTotalGauge.WithLabelValues(metrics.ScopeSession, bindinfo.Using).Write(pb)
c.Assert(err, IsNil)
c.Assert(pb.GetGauge().GetValue(), Equals, float64(0))
metrics.BindMemoryUsage.WithLabelValues(metrics.ScopeSession, bindinfo.Using).Write(pb)
err = metrics.BindMemoryUsage.WithLabelValues(metrics.ScopeSession, bindinfo.Using).Write(pb)
c.Assert(err, IsNil)
c.Assert(pb.GetGauge().GetValue(), Equals, float64(0))
}
}
Expand All @@ -554,7 +565,8 @@ func (s *testSuite) TestGlobalAndSessionBindingBothExist(c *C) {
metrics.BindUsageCounter.Reset()
c.Assert(tk.HasPlan("SELECT * from t1,t2 where t1.id = t2.id", "MergeJoin"), IsTrue)
pb := &dto.Metric{}
metrics.BindUsageCounter.WithLabelValues(metrics.ScopeGlobal).Write(pb)
err := metrics.BindUsageCounter.WithLabelValues(metrics.ScopeGlobal).Write(pb)
c.Assert(err, IsNil)
c.Assert(pb.GetCounter().GetValue(), Equals, float64(1))

// Test 'tidb_use_plan_baselines'
Expand Down
5 changes: 3 additions & 2 deletions cmd/ddltest/column_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
plannercore "github.com/pingcap/tidb/planner/core"
"github.com/pingcap/tidb/session"
"github.com/pingcap/tidb/table"
"github.com/pingcap/tidb/table/tables"
"github.com/pingcap/tidb/types"
log "github.com/sirupsen/logrus"
goctx "golang.org/x/net/context"
Expand All @@ -42,7 +43,7 @@ func (s *TestDDLSuite) checkAddColumn(c *C, rowID int64, defaultVal interface{},
newInsertCount := int64(0)
oldUpdateCount := int64(0)
newUpdateCount := int64(0)
err = tbl.IterRecords(ctx, tbl.FirstKey(), tbl.Cols(), func(_ kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
err = tables.IterRecords(tbl, ctx, tbl.Cols(), func(_ kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
col1Val := data[0].GetValue()
col2Val := data[1].GetValue()
col3Val := data[2].GetValue()
Expand Down Expand Up @@ -93,7 +94,7 @@ func (s *TestDDLSuite) checkDropColumn(c *C, rowID int64, alterColumn *table.Col
}
insertCount := int64(0)
updateCount := int64(0)
err = tbl.IterRecords(ctx, tbl.FirstKey(), tbl.Cols(), func(_ kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
err = tables.IterRecords(tbl, ctx, tbl.Cols(), func(_ kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
if reflect.DeepEqual(data[1].GetValue(), data[0].GetValue()) {
// Check inserted row.
insertCount++
Expand Down
27 changes: 16 additions & 11 deletions cmd/ddltest/ddl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import (
"github.com/pingcap/tidb/store"
tidbdriver "github.com/pingcap/tidb/store/driver"
"github.com/pingcap/tidb/table"
"github.com/pingcap/tidb/table/tables"
"github.com/pingcap/tidb/types"
"github.com/pingcap/tidb/util/logutil"
"github.com/pingcap/tidb/util/testkit"
Expand Down Expand Up @@ -97,11 +98,11 @@ type TestDDLSuite struct {
}

func (s *TestDDLSuite) SetUpSuite(c *C) {
logutil.InitLogger(&logutil.LogConfig{Config: zaplog.Config{Level: *logLevel}})
err := logutil.InitLogger(&logutil.LogConfig{Config: zaplog.Config{Level: *logLevel}})
c.Assert(err, IsNil)

s.quit = make(chan struct{})

var err error
s.store, err = store.New(fmt.Sprintf("tikv://%s%s", *etcd, *tikvPath))
c.Assert(err, IsNil)

Expand Down Expand Up @@ -304,7 +305,11 @@ func (s *TestDDLSuite) startServer(i int, fp *os.File) (*server, error) {
}
log.Warnf("ping addr %v failed, retry count %d err %v", addr, i, err)

db.Close()
err = db.Close()
if err != nil {
log.Warnf("close db failed, retry count %d err %v", i, err)
break
}
time.Sleep(sleepTime)
sleepTime += sleepTime
}
Expand Down Expand Up @@ -600,7 +605,7 @@ func (s *TestDDLSuite) TestSimpleInsert(c *C) {

tbl := s.getTable(c, "test_insert")
handles := kv.NewHandleMap()
err = tbl.IterRecords(ctx, tbl.FirstKey(), tbl.Cols(), func(h kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
err = tables.IterRecords(tbl, ctx, tbl.Cols(), func(h kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
handles.Set(h, struct{}{})
c.Assert(data[0].GetValue(), Equals, data[1].GetValue())
return true, nil
Expand Down Expand Up @@ -651,7 +656,7 @@ func (s *TestDDLSuite) TestSimpleConflictInsert(c *C) {

tbl := s.getTable(c, tblName)
handles := kv.NewHandleMap()
err = tbl.IterRecords(ctx, tbl.FirstKey(), tbl.Cols(), func(h kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
err = tables.IterRecords(tbl, ctx, tbl.Cols(), func(h kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
handles.Set(h, struct{}{})
c.Assert(keysMap, HasKey, data[0].GetValue())
c.Assert(data[0].GetValue(), Equals, data[1].GetValue())
Expand Down Expand Up @@ -704,7 +709,7 @@ func (s *TestDDLSuite) TestSimpleUpdate(c *C) {

tbl := s.getTable(c, tblName)
handles := kv.NewHandleMap()
err = tbl.IterRecords(ctx, tbl.FirstKey(), tbl.Cols(), func(h kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
err = tables.IterRecords(tbl, ctx, tbl.Cols(), func(h kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
handles.Set(h, struct{}{})
key := data[0].GetInt64()
c.Assert(data[1].GetValue(), Equals, keysMap[key])
Expand Down Expand Up @@ -777,7 +782,7 @@ func (s *TestDDLSuite) TestSimpleConflictUpdate(c *C) {

tbl := s.getTable(c, tblName)
handles := kv.NewHandleMap()
err = tbl.IterRecords(ctx, tbl.FirstKey(), tbl.Cols(), func(h kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
err = tables.IterRecords(tbl, ctx, tbl.Cols(), func(h kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
handles.Set(h, struct{}{})
c.Assert(keysMap, HasKey, data[0].GetValue())

Expand Down Expand Up @@ -827,7 +832,7 @@ func (s *TestDDLSuite) TestSimpleDelete(c *C) {

tbl := s.getTable(c, tblName)
handles := kv.NewHandleMap()
err = tbl.IterRecords(ctx, tbl.FirstKey(), tbl.Cols(), func(h kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
err = tables.IterRecords(tbl, ctx, tbl.Cols(), func(h kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
handles.Set(h, struct{}{})
return true, nil
})
Expand Down Expand Up @@ -897,7 +902,7 @@ func (s *TestDDLSuite) TestSimpleConflictDelete(c *C) {

tbl := s.getTable(c, tblName)
handles := kv.NewHandleMap()
err = tbl.IterRecords(ctx, tbl.FirstKey(), tbl.Cols(), func(h kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
err = tables.IterRecords(tbl, ctx, tbl.Cols(), func(h kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
handles.Set(h, struct{}{})
c.Assert(keysMap, HasKey, data[0].GetValue())
return true, nil
Expand Down Expand Up @@ -967,7 +972,7 @@ func (s *TestDDLSuite) TestSimpleMixed(c *C) {
tbl := s.getTable(c, tblName)
updateCount := int64(0)
insertCount := int64(0)
err = tbl.IterRecords(ctx, tbl.FirstKey(), tbl.Cols(), func(_ kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
err = tables.IterRecords(tbl, ctx, tbl.Cols(), func(_ kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
if reflect.DeepEqual(data[1].GetValue(), data[0].GetValue()) {
insertCount++
} else if reflect.DeepEqual(data[1].GetValue(), defaultValue) && data[0].GetInt64() < int64(rowCount) {
Expand Down Expand Up @@ -1037,7 +1042,7 @@ func (s *TestDDLSuite) TestSimpleInc(c *C) {
c.Assert(err, IsNil)

tbl := s.getTable(c, "test_inc")
err = tbl.IterRecords(ctx, tbl.FirstKey(), tbl.Cols(), func(_ kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
err = tables.IterRecords(tbl, ctx, tbl.Cols(), func(_ kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
if reflect.DeepEqual(data[0].GetValue(), int64(0)) {
if *enableRestart {
c.Assert(data[1].GetValue(), GreaterEqual, int64(rowCount))
Expand Down
10 changes: 7 additions & 3 deletions cmd/ddltest/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (s *TestDDLSuite) checkAddIndex(c *C, indexInfo *model.IndexInfo) {

// read handles form table
handles := kv.NewHandleMap()
err = tbl.IterRecords(ctx, tbl.FirstKey(), tbl.Cols(),
err = tables.IterRecords(tbl, ctx, tbl.Cols(),
func(h kv.Handle, data []types.Datum, cols []*table.Column) (bool, error) {
handles.Set(h, struct{}{})
return true, nil
Expand All @@ -64,7 +64,8 @@ func (s *TestDDLSuite) checkAddIndex(c *C, indexInfo *model.IndexInfo) {
txn, err := ctx.Txn(false)
c.Assert(err, IsNil)
defer func() {
txn.Rollback()
err = txn.Rollback()
c.Assert(err, IsNil)
}()

it, err := idx.SeekFirst(txn)
Expand Down Expand Up @@ -103,7 +104,10 @@ func (s *TestDDLSuite) checkDropIndex(c *C, indexInfo *model.IndexInfo) {
c.Assert(err, IsNil)
txn, err := ctx.Txn(false)
c.Assert(err, IsNil)
defer txn.Rollback()
defer func(){
err := txn.Rollback()
c.Assert(err, IsNil)
}()

it, err := idx.SeekFirst(txn)
c.Assert(err, IsNil)
Expand Down
46 changes: 20 additions & 26 deletions cmd/explaintest/r/clustered_index.result
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ load stats 's/wout_cluster_index_tbl_3.json';
load stats 's/wout_cluster_index_tbl_4.json';
explain select count(*) from with_cluster_index.tbl_0 where col_0 < 5429 ;
id estRows task access object operator info
StreamAgg_27 1.00 root funcs:count(Column#9)->Column#6
└─TableReader_28 1.00 root data:StreamAgg_9
└─StreamAgg_9 1.00 cop[tikv] funcs:count(1)->Column#9
└─Selection_26 798.90 cop[tikv] lt(with_cluster_index.tbl_0.col_0, 5429)
└─TableFullScan_25 2244.00 cop[tikv] table:tbl_0 keep order:false
StreamAgg_17 1.00 root funcs:count(Column#8)->Column#6
└─IndexReader_18 1.00 root index:StreamAgg_9
└─StreamAgg_9 1.00 cop[tikv] funcs:count(1)->Column#8
└─IndexRangeScan_16 798.90 cop[tikv] table:tbl_0, index:idx_3(col_0) range:[-inf,5429), keep order:false
explain select count(*) from wout_cluster_index.tbl_0 where col_0 < 5429 ;
id estRows task access object operator info
StreamAgg_17 1.00 root funcs:count(Column#9)->Column#7
Expand All @@ -41,11 +40,10 @@ StreamAgg_17 1.00 root funcs:count(Column#9)->Column#7
└─IndexRangeScan_16 798.90 cop[tikv] table:tbl_0, index:idx_3(col_0) range:[-inf,5429), keep order:false
explain select count(*) from with_cluster_index.tbl_0 where col_0 < 41 ;
id estRows task access object operator info
HashAgg_17 1.00 root funcs:count(Column#8)->Column#6
└─IndexLookUp_18 1.00 root
├─IndexRangeScan_15(Build) 41.00 cop[tikv] table:tbl_0, index:idx_3(col_0) range:[-inf,41), keep order:false
└─HashAgg_7(Probe) 1.00 cop[tikv] funcs:count(1)->Column#8
└─TableRowIDScan_16 41.00 cop[tikv] table:tbl_0 keep order:false
StreamAgg_17 1.00 root funcs:count(Column#8)->Column#6
└─IndexReader_18 1.00 root index:StreamAgg_9
└─StreamAgg_9 1.00 cop[tikv] funcs:count(1)->Column#8
└─IndexRangeScan_16 41.00 cop[tikv] table:tbl_0, index:idx_3(col_0) range:[-inf,41), keep order:false
explain select count(*) from wout_cluster_index.tbl_0 where col_0 < 41 ;
id estRows task access object operator info
StreamAgg_17 1.00 root funcs:count(Column#9)->Column#7
Expand Down Expand Up @@ -78,19 +76,16 @@ StreamAgg_37 1.00 root funcs:sum(Column#20)->Column#7
└─TableFullScan_35 2244.00 cop[tikv] table:tbl_0 keep order:false
explain select col_0 from with_cluster_index.tbl_0 where col_0 <= 0 ;
id estRows task access object operator info
Projection_4 1.00 root with_cluster_index.tbl_0.col_0
└─IndexLookUp_10 1.00 root
├─IndexRangeScan_8(Build) 1.00 cop[tikv] table:tbl_0, index:idx_3(col_0) range:[-inf,0], keep order:false
└─TableRowIDScan_9(Probe) 1.00 cop[tikv] table:tbl_0 keep order:false
IndexReader_6 1.00 root index:IndexRangeScan_5
└─IndexRangeScan_5 1.00 cop[tikv] table:tbl_0, index:idx_3(col_0) range:[-inf,0], keep order:false
explain select col_0 from wout_cluster_index.tbl_0 where col_0 <= 0 ;
id estRows task access object operator info
IndexReader_6 1.00 root index:IndexRangeScan_5
└─IndexRangeScan_5 1.00 cop[tikv] table:tbl_0, index:idx_3(col_0) range:[-inf,0], keep order:false
explain select col_3 from with_cluster_index.tbl_0 where col_3 >= '1981-09-15' ;
id estRows task access object operator info
Projection_4 1859.31 root with_cluster_index.tbl_0.col_3
└─TableReader_6 1859.31 root data:TableRangeScan_5
└─TableRangeScan_5 1859.31 cop[tikv] table:tbl_0 range:[1981-09-15 00:00:00,+inf], keep order:false
TableReader_6 1859.31 root data:TableRangeScan_5
└─TableRangeScan_5 1859.31 cop[tikv] table:tbl_0 range:[1981-09-15 00:00:00,+inf], keep order:false
explain select col_3 from wout_cluster_index.tbl_0 where col_3 >= '1981-09-15' ;
id estRows task access object operator info
IndexReader_10 1859.31 root index:IndexRangeScan_9
Expand All @@ -112,10 +107,10 @@ HashJoin_22 2533.51 root right outer join, equal:[eq(wout_cluster_index.tbl_2.c
└─TableFullScan_41 4673.00 cop[tikv] table:tbl_2 keep order:false
explain select count(*) from with_cluster_index.tbl_0 where col_0 <= 0 ;
id estRows task access object operator info
StreamAgg_10 1.00 root funcs:count(1)->Column#6
└─IndexLookUp_24 1.00 root
├─IndexRangeScan_22(Build) 1.00 cop[tikv] table:tbl_0, index:idx_3(col_0) range:[-inf,0], keep order:false
└─TableRowIDScan_23(Probe) 1.00 cop[tikv] table:tbl_0 keep order:false
StreamAgg_16 1.00 root funcs:count(Column#8)->Column#6
└─IndexReader_17 1.00 root index:StreamAgg_9
└─StreamAgg_9 1.00 cop[tikv] funcs:count(1)->Column#8
└─IndexRangeScan_11 1.00 cop[tikv] table:tbl_0, index:idx_3(col_0) range:[-inf,0], keep order:false
explain select count(*) from wout_cluster_index.tbl_0 where col_0 <= 0 ;
id estRows task access object operator info
StreamAgg_16 1.00 root funcs:count(Column#9)->Column#7
Expand All @@ -124,11 +119,10 @@ StreamAgg_16 1.00 root funcs:count(Column#9)->Column#7
└─IndexRangeScan_11 1.00 cop[tikv] table:tbl_0, index:idx_3(col_0) range:[-inf,0], keep order:false
explain select count(*) from with_cluster_index.tbl_0 where col_0 >= 803163 ;
id estRows task access object operator info
HashAgg_17 1.00 root funcs:count(Column#8)->Column#6
└─IndexLookUp_18 1.00 root
├─IndexRangeScan_15(Build) 109.70 cop[tikv] table:tbl_0, index:idx_3(col_0) range:[803163,+inf], keep order:false
└─HashAgg_7(Probe) 1.00 cop[tikv] funcs:count(1)->Column#8
└─TableRowIDScan_16 109.70 cop[tikv] table:tbl_0 keep order:false
StreamAgg_17 1.00 root funcs:count(Column#8)->Column#6
└─IndexReader_18 1.00 root index:StreamAgg_9
└─StreamAgg_9 1.00 cop[tikv] funcs:count(1)->Column#8
└─IndexRangeScan_16 109.70 cop[tikv] table:tbl_0, index:idx_3(col_0) range:[803163,+inf], keep order:false
explain select count(*) from wout_cluster_index.tbl_0 where col_0 >= 803163 ;
id estRows task access object operator info
StreamAgg_17 1.00 root funcs:count(Column#9)->Column#7
Expand Down
2 changes: 1 addition & 1 deletion cmd/explaintest/r/generated_columns.result
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set @@tidb_partition_prune_mode='dynamic-only';
set @@tidb_partition_prune_mode='dynamic';
DROP TABLE IF EXISTS person;
CREATE TABLE person (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
Expand Down
2 changes: 1 addition & 1 deletion cmd/explaintest/t/generated_columns.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- Most of the cases are ported from other tests to make sure generated columns behaves the same.

-- Stored generated columns as indices
set @@tidb_partition_prune_mode='dynamic-only';
set @@tidb_partition_prune_mode='dynamic';

DROP TABLE IF EXISTS person;
CREATE TABLE person (
Expand Down
Loading

0 comments on commit f1c54ba

Please sign in to comment.