Fixed bug where we weren't calling close on the engine (no shutdown logic for async push)

This commit is contained in:
Zach Musgrave
2023-02-28 10:27:24 -08:00
parent af184bdd55
commit e26270f178
2 changed files with 3 additions and 1 deletions

View File

@@ -271,6 +271,7 @@ func (cmd SqlCmd) Exec(ctx context.Context, commandStr string, args []string, dE
if err != nil {
return HandleVErrAndExitCode(errhand.VerboseErrorFromError(err), usage)
}
defer se.Close()
var workingRoot *doltdb.RootValue
if dEnv != nil && dEnv.Valid() {
@@ -350,6 +351,7 @@ func newEngine(
username string,
mrEnv *env.MultiRepoEnv,
) (*engine.SqlEngine, *sql.Context, error) {
format := engine.FormatTabular
if formatSr, ok := apr.GetValue(FormatFlag); ok {
var verr errhand.VerboseError

View File

@@ -728,11 +728,11 @@ SQL
dolt sql -q "create table t1 (a int primary key)"
dolt sql -q "call dolt_add('.')"
dolt sql -q "call dolt_commit('-am', 'cm')"
sleep 5
cd ..
dolt clone file://./rem1 repo2
cd repo2
run dolt ls
[ "$status" -eq 0 ]
[ "${#lines[@]}" -eq 2 ]