SELECT table_name, n_rows
FROM mysql.innodb_table_stats
WHERE table_name IN ('stats_rename_old', 'stats_rename_new');
SELECT table_name, index_name, stat_name, stat_value
FROM mysql.innodb_index_stats
WHERE table_name IN ('stats_rename_old', 'stats_rename_new');
CREATE TABLE stats_rename_old (a INT, PRIMARY KEY (a))
ENGINE=INNODB STATS_PERSISTENT=1;
SELECT table_name, n_rows
FROM mysql.innodb_table_stats
WHERE table_name IN ('stats_rename_old', 'stats_rename_new');
table_name	stats_rename_old
n_rows	0
SELECT table_name, index_name, stat_name, stat_value
FROM mysql.innodb_index_stats
WHERE table_name IN ('stats_rename_old', 'stats_rename_new');
table_name	stats_rename_old
index_name	PRIMARY
stat_name	n_diff_pfx01
stat_value	0
table_name	stats_rename_old
index_name	PRIMARY
stat_name	n_leaf_pages
stat_value	1
table_name	stats_rename_old
index_name	PRIMARY
stat_name	size
stat_value	1
RENAME TABLE stats_rename_old TO stats_rename_new;
SELECT table_name, n_rows
FROM mysql.innodb_table_stats
WHERE table_name IN ('stats_rename_old', 'stats_rename_new');
table_name	stats_rename_new
n_rows	0
SELECT table_name, index_name, stat_name, stat_value
FROM mysql.innodb_index_stats
WHERE table_name IN ('stats_rename_old', 'stats_rename_new');
table_name	stats_rename_new
index_name	PRIMARY
stat_name	n_diff_pfx01
stat_value	0
table_name	stats_rename_new
index_name	PRIMARY
stat_name	n_leaf_pages
stat_value	1
table_name	stats_rename_new
index_name	PRIMARY
stat_name	size
stat_value	1
DROP TABLE stats_rename_new;
