This behavior is for the benefit of applications that use the output of SHOW GRANTS FOR user  to determine which privileges are granted explicitly to the named user. Were that output to include mandatory roles, it would be difficult to distinguish roles granted explicitly to the user from mandatory roles. 

For the current user, applications can determine privileges with or without mandatory roles by using SHOW GRANTS  or SHOW GRANTS FOR CURRENT_USER , respectively. 

## 13.7.7.22 SHOW INDEX Statement 

SHOW [EXTENDED] {INDEX | INDEXES | KEYS} {FROM | IN} tbl_name [{FROM | IN} db_name ] [WHERE expr ] 

SHOW INDEX  returns table index information. The format resembles that of the SQLStatistics  call in ODBC. This statement requires some privilege for any column in the table. 

mysql> SHOW INDEX FROM City\G *************************** 1. row *************************** Table: city Non_unique: 0 Key_name: PRIMARY  Seq_in_index: 1 Column_name: ID Collation: A Cardinality: 4188 Sub_part: NULL Packed: NULL Null: Index_type: BTREE Comment: Index_comment: Visible: YES Expression: NULL *************************** 2. row *************************** Table: city Non_unique: 1 Key_name: CountryCode  Seq_in_index: 1 Column_name: CountryCode Collation: A Cardinality: 232 Sub_part: NULL Packed: NULL Null: Index_type: BTREE Comment: Index_comment: Visible: YES Expression: NULL 

An alternative to tbl_name  FROM db_name  syntax is db_name . tbl_name . These two statements are equivalent: 

SHOW INDEX FROM mytable FROM mydb; SHOW INDEX FROM mydb.mytable; 

The optional EXTENDED  keyword causes the output to include information about hidden indexes that MySQL uses internally and are not accessible by users. 

The WHERE  clause can be given to select rows using more general conditions, as discussed in Section 26.8, “Extensions to SHOW Statements” . 

SHOW INDEX  returns the following fields: 

