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 only cassandra keyspaces and tables in cqlsh #198

Closed
rkarthik007 opened this issue Apr 20, 2018 · 3 comments
Closed

Show only cassandra keyspaces and tables in cqlsh #198

rkarthik007 opened this issue Apr 20, 2018 · 3 comments
Assignees
Labels
kind/bug This issue is a bug

Comments

@rkarthik007
Copy link
Collaborator

Seeing postgres keyspaces and tables in cqlsh:

cqlsh> DESCRIBE KEYSPACES;

system_schema  system_auth  system  bookstore  test  foo

cqlsh> use test;
InvalidRequest: Error from server: code=2200 [Invalid query] message="SQL error (yb/yql/cql/ql/ptree/process_context.cc:180): Keyspace Not Found. Not found (yb/yql/cql/ql/util/ql_env.cc:296): Cannot use unknown keyspace
use test;
^^^
 (error -308)"
@rkarthik007 rkarthik007 added the kind/bug This issue is a bug label Apr 20, 2018
yugabyte-ci pushed a commit that referenced this issue Apr 26, 2018
Summary:
Filter entries in CQL system tables to only include keyspaces that have CQL type.
Additionally check the table type when looking up tables in CQL analyzer to disallow CQL DDL/DML statements on Postgres tables.
Previously we were only skipping the Redis keyspace/table as a special case.

Test Plan:
$ bin/psql -p 5433 -h 127.0.0.1
> create database bar;
> create database foo;
> create table test (id int);

Then, the following should only return CQL tables (not include any of the above).
$ cqlsh
cqlsh> describe keyspaces;
cqlsh> describe tables;
cqlsh> select * from system.partitions;

Reviewers: neil, robert

Reviewed By: robert

Subscribers: karthik, bogdan, yql, bharat

Differential Revision: https://phabricator.dev.yugabyte.com/D4692
@m-iancu
Copy link
Contributor

m-iancu commented Apr 26, 2018

fixed by 0bc9d69

@m-iancu m-iancu closed this as completed Apr 26, 2018
yugabyte-ci pushed a commit that referenced this issue Apr 27, 2018
This reverts commit ba7d7669cd4737c8c5ed7ddd6c5dee8fa9250ff9.
@m-iancu
Copy link
Contributor

m-iancu commented Apr 28, 2018

Reverted to a backwards compatibility issue, re-opening.

@m-iancu m-iancu reopened this Apr 28, 2018
@robertpang
Copy link
Contributor

Fixed in commit 5ff9faf.

@robertpang robertpang assigned rven1 and robertpang and unassigned robertpang Jun 19, 2018
jasonyb pushed a commit that referenced this issue Jun 11, 2024
PG-359 Doc - Update pg_stat_monitor_settings view with new options (RC2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This issue is a bug
Projects
None yet
Development

No branches or pull requests

4 participants