Description:
Document error: mysql.index_stats should be mysql.innodb_index_stats.
How to repeat:
mysql> select * from mysql.index_stats;
ERROR 3554 (HY000): Access to data dictionary table 'mysql.index_stats' is rejected.
mysql> select * from mysql.innodb_index_stats;
+---------------+------------+------------+---------------------+--------------+------------+-------------+-----------------------------------+
| database_name | table_name | index_name | last_update | stat_name | stat_value | sample_size | stat_description |
+---------------+------------+------------+---------------------+--------------+------------+-------------+-----------------------------------+
| mysql | component | PRIMARY | 2023-08-02 17:53:43 | n_diff_pfx01 | 0 | 1 | component_id |
| mysql | component | PRIMARY | 2023-08-02 17:53:43 | n_leaf_pages | 1 | NULL | Number of leaf pages in the index |
| mysql | component | PRIMARY | 2023-08-02 17:53:43 | size | 1 | NULL | Number of pages in the index |
| sys | sys_config | PRIMARY | 2023-08-02 17:53:43 | n_diff_pfx01 | 6 | 1 | variable |
| sys | sys_config | PRIMARY | 2023-08-02 17:53:43 | n_leaf_pages | 1 | NULL | Number of leaf pages in the index |
| sys | sys_config | PRIMARY | 2023-08-02 17:53:43 | size | 1 | NULL | Number of pages in the index |
+---------------+------------+------------+---------------------+--------------+------------+-------------+-----------------------------------+
6 rows in set (0.00 sec)
mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.34 |
+-----------+
1 row in set (0.00 sec)
Suggested fix:
fix it in
https://dev.mysql.com/doc/refman/8.0/en/information-schema-optimization.html
https://dev.mysql.com/doc/refman/8.1/en/information-schema-optimization.html