Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-19.1: cli: ensure SQL commands work when defaultdb d… #41131

Merged
merged 1 commit into from
Sep 26, 2019

Conversation

knz
Copy link
Contributor

@knz knz commented Sep 26, 2019

Backport 1/1 commits from #41121.

/cc @cockroachdb/release


Fixes #40967.

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.

@knz knz requested a review from bdarnell September 26, 2019 18:01
@knz knz requested a review from a team as a code owner September 26, 2019 18:01
@knz knz requested a review from a team September 26, 2019 18:01
@knz knz added this to To do in DB Server & Security via automation Sep 26, 2019
@cockroach-teamcity
Copy link
Member

This change is Reviewable

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).
@knz knz changed the title release-19.1: cli: ensure SQL commands work when defaultdb does not exist release-19.1: cli: ensure SQL commands work when defaultdb d… Sep 26, 2019
@knz knz merged commit 98d326e into cockroachdb:release-19.1 Sep 26, 2019
DB Server & Security automation moved this from To do to Done 19.2 Sep 26, 2019
@knz knz deleted the backport19.1-41121 branch September 26, 2019 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants