Skip to content

Commit

Permalink
Merge pull request #8427 from dolthub/taylor/detach-fix
Browse files Browse the repository at this point in the history
Fix AllSchemas for detached head
  • Loading branch information
tbantle22 authored Oct 8, 2024
2 parents 283d693 + dc6cc1a commit 070b341
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions go/libraries/doltcore/sqle/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -1426,12 +1426,11 @@ func (db Database) AllSchemas(ctx *sql.Context) ([]sql.DatabaseSchema, error) {
return []sql.DatabaseSchema{db}, nil
}

ws, err := db.GetWorkingSet(ctx)
root, err := db.GetRoot(ctx)
if err != nil {
return nil, err
}

root := ws.WorkingRoot()
schemas, err := root.GetDatabaseSchemas(ctx)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion go/libraries/doltcore/sqle/enginetest/dolt_queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -3346,7 +3346,7 @@ var DoltInfoSchemaScripts = []queries.ScriptTest{
},
},
{
Name: "info_schema with detatched HEAD",
Name: "info_schema with detached HEAD",
SetUpScript: []string{
"create table t (a int primary key, b int);",
"call dolt_commit('-Am', 'creating table t');",
Expand Down

0 comments on commit 070b341

Please sign in to comment.