Skip to content

Commit

Permalink
consistency, black_white_list: fix invalid config option `consistency…
Browse files Browse the repository at this point in the history
…` and improve style (pingcap#42)

* fix invalid config option

* black_white_list: improve style
  • Loading branch information
tangenta authored Mar 9, 2020
1 parent 58ad92c commit 65b93cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions cmd/dumpling/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func run() {
conf.FileSize = fileSize
conf.StatementSize = statementSize
conf.OutputDirPath = outputDir
conf.Consistency = consistency
conf.NoViews = noViews

err = export.Dump(conf)
Expand Down
6 changes: 2 additions & 4 deletions v4/export/black_white_list.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package export

import (
"strings"

"github.com/pingcap/dumpling/v4/log"
"github.com/pingcap/tidb-tools/pkg/filter"
"go.uber.org/zap"
)

type BWList interface {
Apply(string, string) bool
Apply(schema string, table string) bool
}

type BWListMode byte
Expand Down Expand Up @@ -66,7 +64,7 @@ func filterDirtySchemaTables(conf *Config) {
switch conf.ServerInfo.ServerType {
case ServerTypeTiDB:
for dbName := range conf.Tables {
if filter.IsSystemSchema(strings.ToLower(dbName)) {
if filter.IsSystemSchema(dbName) {
log.Zap().Warn("unsupported dump schema in TiDB now", zap.String("schema", dbName))
delete(conf.Tables, dbName)
}
Expand Down

0 comments on commit 65b93cc

Please sign in to comment.