diff --git a/cmd/go-mysqldump/main.go b/cmd/go-mysqldump/main.go index b49f0c1ef..ea2d81bd2 100644 --- a/cmd/go-mysqldump/main.go +++ b/cmd/go-mysqldump/main.go @@ -18,10 +18,11 @@ var ( execution = flag.String("exec", "mysqldump", "mysqldump execution path") output = flag.String("o", "", "dump output, empty for stdout") - dbs = flag.String("dbs", "", "dump databases, separated by comma") - tables = flag.String("tables", "", "dump tables, separated by comma, will overwrite dbs") - tableDB = flag.String("table_db", "", "database for dump tables") - ignoreTables = flag.String("ignore_tables", "", "ignore tables, must be database.table format, separated by comma") + dbs = flag.String("dbs", "", "dump databases, separated by comma") + tables = flag.String("tables", "", "dump tables, separated by comma, will overwrite dbs") + tableDB = flag.String("table_db", "", "database for dump tables") + ignoreTables = flag.String("ignore_tables", "", "ignore tables, must be database.table format, separated by comma") + skipBinlogPos = flag.Bool("skip-binlog-pos", false, "skip fetching binlog position via --master-data/--source-data") ) func main() { @@ -33,6 +34,8 @@ func main() { os.Exit(1) } + d.SkipMasterData(*skipBinlogPos) + if len(*ignoreTables) > 0 { subs := strings.Split(*ignoreTables, ",") for _, sub := range subs {