Skip to content

Commit

Permalink
Remove temporary workaround for loopback bug in GMS (#6283)
Browse files Browse the repository at this point in the history
  • Loading branch information
macneale4 authored Jul 6, 2023
1 parent 159e138 commit 65f2163
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
12 changes: 1 addition & 11 deletions go/cmd/dolt/commands/sqlserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"fmt"
"net"
"net/http"
"os"
"runtime"
"strconv"
"time"
Expand Down Expand Up @@ -224,11 +223,7 @@ func Serve(
lck := env.NewDBLock(serverConfig.Port())
sqlserver.SetRunningServer(mySQLServer, &lck)

localConnectionHost := "localhost"
if isDoltTestEnvSet() {
localConnectionHost = "%"
}
sqlEngine.GetUnderlyingEngine().Analyzer.Catalog.MySQLDb.AddSuperUser(LocalConnectionUser, localConnectionHost, lck.Secret)
sqlEngine.GetUnderlyingEngine().Analyzer.Catalog.MySQLDb.AddSuperUser(LocalConnectionUser, "localhost", lck.Secret)

var metSrv *http.Server
if serverConfig.MetricsHost() != "" && serverConfig.MetricsPort() > 0 {
Expand Down Expand Up @@ -519,8 +514,3 @@ func checkForUnixSocket(config ServerConfig) (string, bool, error) {

return "", false, nil
}

// isDoltTestEnvSet Temporary function to enable __dolt_local_user__ to be used until https://github.com/dolthub/dolt/issues/6239 is resolved
func isDoltTestEnvSet() bool {
return os.Getenv("DOLT_ENABLE_LOCAL_USER_FOR_ALL_HOSTS") != ""
}
2 changes: 0 additions & 2 deletions integration-tests/bats/helper/common.bash
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ setup_no_dolt_init() {
# during the cli -> sql migration.
export DOLT_CLI_PASSWORD=""
export DOLT_SILENCE_USER_REQ_FOR_TESTING="Y"
# Temporary Flag: https://github.com/dolthub/dolt/issues/6239
export DOLT_ENABLE_LOCAL_USER_FOR_ALL_HOSTS="Y"
}

assert_feature_version() {
Expand Down

0 comments on commit 65f2163

Please sign in to comment.