dolthub / dolthub/dolt

Client cannot connect to database in fringe scenario where default branch does not exist.

Open
#6,160 0 comments 0 reactions 1 assignee Claimed by @zachmu View on GitHub
bug sql server
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 8h
Merged PRs (30d)
120

Description

To repro:

```
dolt branch -c main to_keep
dolt sql -q 'call dolt_checkout("to_keep"); call dolt_branch("-D", "main");'
dolt sql -q "select * from dolt_branches;"
```

Expected output:

```
to_keep
```

Actual output:

```
error on line 1 for query select * from dolt_branches: cannot resolve default branch head for database 'dolt_repo_33790': 'main'
```

According to @zachmu, it's important that the server is always able to start and the client is always able to connect to *something*. This is especially important as we migrate the CLI commands to be implemented in terms of SQL queries, since we should always be able to run CLI commands to fix a weird state we get into.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.