vitessio / vitess

Vitess is a database clustering system for horizontal scaling of MySQL.
http://vitess.io
Apache License 2.0
18.74k stars 2.1k forks source link

Column names for show tables are wrong #7253

Open systay opened 3 years ago

systay commented 3 years ago

Overview of the Issue

When doing show tables on a database named foobar, the column in the result set has vt_ prepended:

mysql> use foobar;
Database changed
mysql> show tables;
+---------------------+
| Tables_in_vt_foobar |
+---------------------+
| music               |
| user                |
| user_extra          |
+---------------------+
3 rows in set (0.00 sec)
deepthi commented 3 years ago

database -> keyspace? It seems that the column name is coming from the underlying database name which defaults to vt_foobar. If it were overridden using -init_db_name_override flag to xyz then the column name would be Tables_in_xyz. Are we saying that it should always be Tables_in_foobar regardless of underlying database name?

systay commented 3 years ago

Yeah, this is all about imitating MySQL behaviour. The issue is not critical per se, but the behaviour is surprising, wouldn't you agree?