mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
5d20f7b346
Made sure that innodb tables for persistent statistics would not considered by the server as system tables.
50 lines
1.5 KiB
Text
50 lines
1.5 KiB
Text
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;
|