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

"show database" fails in command-line client #3882

Closed
knz opened this issue Jan 15, 2016 · 6 comments
Closed

"show database" fails in command-line client #3882

knz opened this issue Jan 15, 2016 · 6 comments
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@knz
Copy link
Contributor

knz commented Jan 15, 2016

Running cockroach sql --insecure then show databases;:

query error: util/encoding/encoding.go:426: did not find marker

That used to work a few days ago.

or with a previously created database test, select database test;:

query error: qualified name """.database" not found

The error is at best confusing, at worst likely incorrect.

@knz knz added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. SQL labels Jan 15, 2016
@tbg
Copy link
Member

tbg commented Jan 15, 2016

I0115 05:27:43.921338 72722 cli/start.go:142 build Tag:
v0.1-alpha-424-g78ae391
I0115 05:27:43.921347 72722 cli/start.go:143 build Time: 2016/01/15
10:11:40

macts.local:26257> show databases;
I0115 05:27:55.517242 72795 context.go:168 running in insecure mode, this
is strongly discouraged. See --insecure and --certs.
+----------+
| Database |
+----------+
| system |
+----------+
macts.local:26257> create database x;
I0115 05:28:21.580285 72917 context.go:168 running in insecure mode, this
is strongly discouraged. See --insecure and --certs.
OK
macts.local:26257> show databases;
+----------+
| Database |
+----------+
| system |
| x |
+----------+
macts.local:26257>

Did you do anything else?

On Fri, Jan 15, 2016 at 5:25 AM kena notifications@github.com wrote:

Running cockroach sql --insecure then show databases;:

query error: util/encoding/encodinggo:426: did not find marker

That used to work a few days ago

or with a previously created database test, select database test;:

query error: qualified name """database" not found

The error is at best confusing, at worst likely incorrect


Reply to this email directly or view it on GitHub
#3882.

@knz
Copy link
Contributor Author

knz commented Jan 15, 2016

This is on an AWS instance freshly updated with cockroach.78ae391f73d5a275b9eb6e9b95dc054653517933.

@petermattis
Copy link
Collaborator

I think this is related to #3553 which changed the on-disk encoding. I think if you start a fresh cluster it should work fine. We need a better story about versioning here.

@knz
Copy link
Contributor Author

knz commented Jan 15, 2016

Thanks for the explanation. What do I need to reset to "start a new cluster"? I erased all my data files named in --store but the error persists. Does cockroach write state in other locations as well?

@petermattis
Copy link
Collaborator

Hmm, that should be sufficient. Cockroach doesn't store anything outside of the store directories. This isn't happening for me either when I tested just now. I'm not sure what is going on. Can you locally build a cockroach binary and run it using cockroach start --dev? I'm curious if SHOW DATABASES fails for you there as well.

@knz
Copy link
Contributor Author

knz commented Jan 19, 2016

Found the cause of the error, it was a consequence of #3909. Now working as expected.

@knz knz closed this as completed Jan 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

No branches or pull requests

3 participants