Server exposure and GMS bump

This commit is contained in:
Daylon Wilkins
2023-09-14 05:11:09 -07:00
parent c41cf78372
commit f1036ae083
4 changed files with 11 additions and 3 deletions

1
.gitignore vendored
View File

@@ -8,6 +8,7 @@ venv
.sqlhistory
.doltcfg
test.sh
*eventsapi@*
# ignore cp'd sysbench runner testing files
SysbenchDockerfile

View File

@@ -52,6 +52,10 @@ const (
LocalConnectionUser = "__dolt_local_user__"
)
// ExternalDisableUsers is called by implementing applications to disable users. This is not used by Dolt itself,
// but will break compatibility with implementing applications that do not yet support users.
var ExternalDisableUsers bool = false
// Serve starts a MySQL-compatible server. Returns any errors that were encountered.
func Serve(
ctx context.Context,
@@ -242,6 +246,9 @@ func Serve(
ed = mysqlDb.Editor()
mysqlDb.AddSuperUser(ed, LocalConnectionUser, "localhost", serverLock.Secret)
ed.Close()
if ExternalDisableUsers {
mysqlDb.SetEnabled(false)
}
var metSrv *http.Server
if serverConfig.MetricsHost() != "" && serverConfig.MetricsPort() > 0 {

View File

@@ -59,7 +59,7 @@ require (
github.com/cespare/xxhash v1.1.0
github.com/creasty/defaults v1.6.0
github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2
github.com/dolthub/go-mysql-server v0.17.1-0.20230913170651-0324aff2a874
github.com/dolthub/go-mysql-server v0.17.1-0.20230914120350-e725bf11fd15
github.com/dolthub/swiss v0.1.0
github.com/goccy/go-json v0.10.2
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510

View File

@@ -180,8 +180,8 @@ github.com/dolthub/fslock v0.0.3 h1:iLMpUIvJKMKm92+N1fmHVdxJP5NdyDK5bK7z7Ba2s2U=
github.com/dolthub/fslock v0.0.3/go.mod h1:QWql+P17oAAMLnL4HGB5tiovtDuAjdDTPbuqx7bYfa0=
github.com/dolthub/go-icu-regex v0.0.0-20230524105445-af7e7991c97e h1:kPsT4a47cw1+y/N5SSCkma7FhAPw7KeGmD6c9PBZW9Y=
github.com/dolthub/go-icu-regex v0.0.0-20230524105445-af7e7991c97e/go.mod h1:KPUcpx070QOfJK1gNe0zx4pA5sicIK1GMikIGLKC168=
github.com/dolthub/go-mysql-server v0.17.1-0.20230913170651-0324aff2a874 h1:85MGoyDrJCkgzZW2x0wk/P1DgE7ihsPVoJtZMN0cUYg=
github.com/dolthub/go-mysql-server v0.17.1-0.20230913170651-0324aff2a874/go.mod h1:9JIDVpLqXjbVJMnAi8qC+ZYmzWQiUyq7DeKd3mU+YT4=
github.com/dolthub/go-mysql-server v0.17.1-0.20230914120350-e725bf11fd15 h1:4/HbFlOsExwh1mAs/Ey3iphMRLteb/Q5WTx7ysDf5uA=
github.com/dolthub/go-mysql-server v0.17.1-0.20230914120350-e725bf11fd15/go.mod h1:9JIDVpLqXjbVJMnAi8qC+ZYmzWQiUyq7DeKd3mU+YT4=
github.com/dolthub/ishell v0.0.0-20221214210346-d7db0b066488 h1:0HHu0GWJH0N6a6keStrHhUAK5/o9LVfkh44pvsV4514=
github.com/dolthub/ishell v0.0.0-20221214210346-d7db0b066488/go.mod h1:ehexgi1mPxRTk0Mok/pADALuHbvATulTh6gzr7NzZto=
github.com/dolthub/jsonpath v0.0.2-0.20230525180605-8dc13778fd72 h1:NfWmngMi1CYUWU4Ix8wM+USEhjc+mhPlT9JUR/anvbQ=