summaryrefslogtreecommitdiff
path: root/mysql-test/suite/gcol
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-01-28 14:15:01 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2021-01-28 14:15:01 +0200
commit6d1f1b61b59310027698a92ccf533a3093f1ce04 (patch)
treed2fbe999dc4df7ebbf2e4c6b20e3f902a0ddffb4 /mysql-test/suite/gcol
parent744e9752d887c3be20c655d882f6ec1b7e0fd727 (diff)
downloadmariadb-git-6d1f1b61b59310027698a92ccf533a3093f1ce04.tar.gz
MDEV-24564 Statistics are lost after ALTER TABLEbb-10.5-MDEV-24564
Ever since commit 007f68c37f6b77588866a04d7515aca084ab950d, ALTER TABLE no longer invokes handler::open() after handler::commit_inplace_alter_table(). ha_innobase::reload_statistics(): Reload or recompute statistics after ALTER TABLE. innodb_notify_tabledef_changed(): A new function to invoke ha_innobase::reload_statistics(). handlerton::notify_tabledef_changed(): Add the parameter handler* so that ha_innobase::reload_statistics() can be invoked. ha_partition::notify_tabledef_changed(), partition_notify_tabledef_changed(): Pass through the call to any partitions or subpartitions. This is based on code that was supplied by Monty.
Diffstat (limited to 'mysql-test/suite/gcol')
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_stats.result16
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_stats.test1
2 files changed, 15 insertions, 2 deletions
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_stats.result b/mysql-test/suite/gcol/r/innodb_virtual_stats.result
index c11b02ff8cb..c0f595263df 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_stats.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_stats.result
@@ -121,5 +121,19 @@ SELECT index_name, stat_name, stat_description
FROM mysql.innodb_index_stats
WHERE database_name = 'test' AND table_name = 't';
index_name stat_name stat_description
-# MDEV-24564 FIXME: Do reload statistics after the above ALTER TABLE!
+GEN_CLUST_INDEX n_diff_pfx01 DB_ROW_ID
+GEN_CLUST_INDEX n_leaf_pages Number of leaf pages in the index
+GEN_CLUST_INDEX size Number of pages in the index
+idxb n_diff_pfx01 b
+idxb n_diff_pfx02 b,DB_ROW_ID
+idxb n_leaf_pages Number of leaf pages in the index
+idxb size Number of pages in the index
+vidxe n_diff_pfx01 e
+vidxe n_diff_pfx02 e,DB_ROW_ID
+vidxe n_leaf_pages Number of leaf pages in the index
+vidxe size Number of pages in the index
+vidxf n_diff_pfx01 f
+vidxf n_diff_pfx02 f,DB_ROW_ID
+vidxf n_leaf_pages Number of leaf pages in the index
+vidxf size Number of pages in the index
DROP TABLE t;
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_stats.test b/mysql-test/suite/gcol/t/innodb_virtual_stats.test
index 728f84de72c..69c67af8ed1 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_stats.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_stats.test
@@ -52,6 +52,5 @@ ALTER TABLE t DROP INDEX vidxcd;
SELECT index_name, stat_name, stat_description
FROM mysql.innodb_index_stats
WHERE database_name = 'test' AND table_name = 't';
--- echo # MDEV-24564 FIXME: Do reload statistics after the above ALTER TABLE!
DROP TABLE t;