mariadb/mysql-test/suite/innodb/r/innodb_stats_rename_table.result
Igor Babaev 5d20f7b346 Added missing tests for innodb persistent statistics (from mysql-5.6.10)
Made sure that innodb tables for persistent statistics would not
considered by the server as system tables.
2013-08-07 17:08:51 -07:00

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;