Skip to content

Commit

Permalink
tidb-server: Change some int flag to bool (pingcap#1542)
Browse files Browse the repository at this point in the history
  • Loading branch information
shenli authored Aug 2, 2016
1 parent 8f93071 commit 12e244e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tidb-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ var (
statusPort = flag.String("status", "10080", "tidb server status port")
lease = flag.Int("lease", 1, "schema lease seconds, very dangerous to change only if you know what you do")
socket = flag.String("socket", "", "The socket file to use for connection.")
enablePS = flag.Int("perfschema", 0, "If enable performance schema.")
reportStatus = flag.Int("report-status", '1', "If enable status report HTTP service")
useNewPlan = flag.Int("newplan", 1, "If use new planner.")
enablePS = flag.Bool("perfschema", false, "If enable performance schema.")
reportStatus = flag.Bool("report-status", true, "If enable status report HTTP service")
useNewPlan = flag.Bool("newplan", true, "If use new planner.")
)

func main() {
Expand All @@ -70,7 +70,7 @@ func main() {
LogLevel: *logLevel,
StatusAddr: fmt.Sprintf(":%s", *statusPort),
Socket: *socket,
ReportStatus: *reportStatus != 0,
ReportStatus: *reportStatus,
}

log.SetLevelByString(cfg.LogLevel)
Expand All @@ -79,11 +79,11 @@ func main() {
log.Fatal(errors.ErrorStack(err))
}

if *enablePS == 1 {
if *enablePS {
perfschema.EnablePerfSchema()
}

if *useNewPlan == 0 {
if *useNewPlan {
plan.UseNewPlanner = false
}

Expand Down

0 comments on commit 12e244e

Please sign in to comment.