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

Support SHOW TABLE STATUS FROM db type queries in vtgate #6354

Closed
aquarapid opened this issue Jun 22, 2020 · 0 comments · Fixed by #6807
Closed

Support SHOW TABLE STATUS FROM db type queries in vtgate #6354

aquarapid opened this issue Jun 22, 2020 · 0 comments · Fixed by #6807
Milestone

Comments

@aquarapid
Copy link
Contributor

In current Vitess, we support I_S passthrough for SHOW TABLE STATUS LIKE 'table1' in the context of the currently USE-ed database.

However, some MySQL introspection/workbench type tools (e.g. DBeaver) use the format:

SHOW TABLE STATUS FROM db1 LIKE 'table1'

This is just passed through by vtgate; and causes problems because the underlying shard instance knows the database (probably) as vt_db1, not db1. We should rewrite this query, since we already virtualize other introspection commands like SHOW FULL COLUMNS FROM db1.table1 (which does work).

Sample error returned from vtgate:

mysql> SHOW TABLE STATUS FROM db1 LIKE 'table1';
ERROR 1049 (42000): vtgate: http://localhost:15001/: target: db1.0.master, used tablet: zone1-100 (localhost): vttablet: rpc error: code = InvalidArgument desc = Unknown database 'db1' (errno 1049) (sqlstate 42000) (CallerID: userData1): Sql: "SHOW TABLE STATUS FROM db1 LIKE 'table1'", BindVars: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants