Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lichunzhu authored and ti-chi-bot committed Aug 24, 2021
1 parent 5d10538 commit 9cc9170
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion v4/export/block_allow_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
tcontext "github.com/pingcap/dumpling/v4/context"
)

func filterDataBases(tctx *tcontext.Context, conf *Config, databases []string) []string {
func filterDatabases(tctx *tcontext.Context, conf *Config, databases []string) []string {
tctx.L().Debug("start to filter databases")
newDatabases := make([]string, 0, len(databases))
ignoreDatabases := make([]string, 0, len(databases))
Expand Down
4 changes: 2 additions & 2 deletions v4/export/block_allow_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ func (s *testBWListSuite) TestFilterTables(c *C) {
}

databases := []string{filter.InformationSchemaName, filter.PerformanceSchemaName, "xxx", "yyy"}
c.Assert(filterDataBases(tctx, conf, databases), DeepEquals, databases)
c.Assert(filterDatabases(tctx, conf, databases), DeepEquals, databases)

conf.TableFilter = tf.NewSchemasFilter("xxx")
c.Assert(filterDataBases(tctx, conf, databases), DeepEquals, []string{"xxx"})
c.Assert(filterDatabases(tctx, conf, databases), DeepEquals, []string{"xxx"})
filterTables(tcontext.Background(), conf)
c.Assert(conf.Tables, HasLen, 1)
c.Assert(conf.Tables, DeepEquals, expectedDBTables)
Expand Down
2 changes: 1 addition & 1 deletion v4/export/prepare.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func prepareDumpingDatabases(tctx *tcontext.Context, conf *Config, db *sql.Conn)
if err != nil {
return nil, err
}
databases = filterDataBases(tctx, conf, databases)
databases = filterDatabases(tctx, conf, databases)
if len(conf.Databases) == 0 {
return databases, nil
}
Expand Down

0 comments on commit 9cc9170

Please sign in to comment.