mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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.
This commit is contained in:
50
mysql-test/suite/innodb/r/innodb_stats_rename_table.result
Normal file
50
mysql-test/suite/innodb/r/innodb_stats_rename_table.result
Normal file
@ -0,0 +1,50 @@
|
||||
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;
|
Reference in New Issue
Block a user