go/cmd/dolt/commands/sqlserver: server.go: Small fix for scope of userSpecified variable in the InitSuperUser step.

This commit is contained in:
Aaron Son
2023-11-15 10:50:09 -08:00
parent a9ea25e32c
commit bfac671d4a

View File

@@ -232,11 +232,9 @@ func Serve(
controller.Register(InitSqlEngine)
// Add superuser if specified user exists; add root superuser if no user specified and no existing privileges
var userSpecified bool
InitSuperUser := &svcs.Service{
Init: func(context.Context) error {
userSpecified = config.ServerUser != ""
userSpecified := config.ServerUser != ""
mysqlDb := sqlEngine.GetUnderlyingEngine().Analyzer.Catalog.MySQLDb
ed := mysqlDb.Editor()