-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: ensure SQL commands work when
defaultdb
does not exist
All the various CLI commands that establish a SQL connection require the target database to exist. If no database is specified via `--database` or `--url`, the server automatically defaults to `defaultdb`. Prior to this patch, the CLI commands that do not strictly require a user database to function properly would fail if `defaultdb` did not exist (e.g. because a user chooses to drop it). This patch changes them to adopt the `system` database instead. The two commands that are operate on a user database, namely `cockroach sql` and `cockroach dump`, continue to work as prior. Release justification: fixes a bug Release note (bug fix): `cockroach zip`, `cockroach node` and `cockroach user` now work properly if the `defaultdb` database has been manually dropped and the connection URL does not specify a database. (Note that `cockroach user` is deprecated in 19.2).
- Loading branch information
Showing
8 changed files
with
53 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters