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

odd error message when dropping database #23661

Closed
dianasaur323 opened this issue Mar 9, 2018 · 3 comments
Closed

odd error message when dropping database #23661

dianasaur323 opened this issue Mar 9, 2018 · 3 comments
Assignees
Labels
S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.
Milestone

Comments

@dianasaur323
Copy link
Contributor

dianasaur323 commented Mar 9, 2018

I ran the following commands:

root@:26257/registration> drop database registration cascade;
DROP DATABASE

Time: 8.089766625s

warning: error retrieving the database name: pq: database "registration" does not exist

The drop ran successfully, but I'm not sure why I get an error message afterwards?

Running show databases confirms that the database is gone.

@dt
Copy link
Member

dt commented Mar 9, 2018

I'm guessing this has to do with it being your current session DB and the cli's state polling that @knz added?

@dt dt assigned knz Mar 9, 2018
@knz knz added the S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption. label Mar 23, 2018
@knz knz added this to the 2.1 milestone Mar 23, 2018
@knz
Copy link
Contributor

knz commented Mar 23, 2018

The problem is that your current database is "registration" and you're just deleting that database.

I think I may fix this error by preventing a DROP in the CLI if the current database is the one being dropped.

@dianasaur323
Copy link
Contributor Author

Yeah, I think you're right. I think another option is to DROP the database and then automatically punt the user back to the schema level (is that what we are calling it now)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.
Projects
None yet
Development

No branches or pull requests

3 participants