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

Commits on Sep 26, 2019

  1. 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).
    knz committed Sep 26, 2019
    Configuration menu
    Copy the full SHA
    cec56a6 View commit details
    Browse the repository at this point in the history