What user-show-access shows is only relevant to mysql command 'GRANT', it means that if you grant select privilege on db1 and db2 to user foo, you can find something like this:
mysql> select * from information_schema.SCHEMA_PRIVILEGES;
+----------------+---------------+--------------+-------------------------+--------------+
| GRANTEE | TABLE_CATALOG | TABLE_SCHEMA | PRIVILEGE_TYPE | IS_GRANTABLE |
+----------------+---------------+--------------+-------------------------+--------------+
| 'foo'@'%' | NULL | db1 | SELECT | NO |
| 'foo'@'%' | NULL | db2 | SELECT | NO |
+----------------+---------------+--------------+-------------------------+--------------+
What if you grant select privilege on a database that's not exist to user foo?
The answer is that you can see something new from information_schema.SCHEMA_PRIVILEGES like this:
mysql> select * from information_schema.SCHEMA_PRIVILEGES;
+----------------+---------------+--------------+-------------------------+--------------+
| GRANTEE | TABLE_CATALOG | TABLE_SCHEMA | PRIVILEGE_TYPE | IS_GRANTABLE |
+----------------+---------------+--------------+-------------------------+--------------+
| 'foo'@'%' | NULL | db1 | SELECT | NO |
| 'foo'@'%' | NULL | db2 | SELECT | NO |
| 'foo'@'%' | NULL | db3 | SELECT | NO |
+----------------+---------------+--------------+-------------------------+--------------+
I don't think it's a bug.
First, command 'trove user-show-access' corresponds to 'select * from information_ schema. SCHEMA_ PRIVILEGES' , you can find out in the codes https:/ /github. com/openstack/ trove/blob/ efd2ad9ee922c80 0e959c09c106155 2d9307e61f/ trove/guestagen t/datastore/ mysql_common/ service. py#L231.
What user-show-access shows is only relevant to mysql command 'GRANT', it means that if you grant select privilege on db1 and db2 to user foo, you can find something like this: schema. SCHEMA_ PRIVILEGES; ------- ---+--- ------- -----+- ------- ------+ ------- ------- ------- ----+-- ------- -----+ ------- ---+--- ------- -----+- ------- ------+ ------- ------- ------- ----+-- ------- -----+ ------- ---+--- ------- -----+- ------- ------+ ------- ------- ------- ----+-- ------- -----+
mysql> select * from information_
+------
| GRANTEE | TABLE_CATALOG | TABLE_SCHEMA | PRIVILEGE_TYPE | IS_GRANTABLE |
+------
| 'foo'@'%' | NULL | db1 | SELECT | NO |
| 'foo'@'%' | NULL | db2 | SELECT | NO |
+------
What if you grant select privilege on a database that's not exist to user foo?
The answer is that you can see something new from information_ schema. SCHEMA_ PRIVILEGES like this: schema. SCHEMA_ PRIVILEGES; ------- ---+--- ------- -----+- ------- ------+ ------- ------- ------- ----+-- ------- -----+ ------- ---+--- ------- -----+- ------- ------+ ------- ------- ------- ----+-- ------- -----+ ------- ---+--- ------- -----+- ------- ------+ ------- ------- ------- ----+-- ------- -----+
mysql> select * from information_
+------
| GRANTEE | TABLE_CATALOG | TABLE_SCHEMA | PRIVILEGE_TYPE | IS_GRANTABLE |
+------
| 'foo'@'%' | NULL | db1 | SELECT | NO |
| 'foo'@'%' | NULL | db2 | SELECT | NO |
| 'foo'@'%' | NULL | db3 | SELECT | NO |
+------
You can find out more here https:/ /dev.mysql. com/doc/ refman/ 5.7/en/ schema- privileges- table.html.