summaryrefslogtreecommitdiff
path: root/storage/innobase
diff options
context:
space:
mode:
authorAakanksha Verma <aakanksha.verma@oracle.com>2019-01-30 23:09:57 +0530
committerMarko Mäkelä <marko.makela@mariadb.com>2019-04-25 14:12:45 +0300
commit3ae219848322dea1e42b9ba25e3066bbc9aa217d (patch)
treeef58526ed3e152440fd388635f575601a584bc39 /storage/innobase
parentbb17094be484a4cbf94e21a96c2dbb2930ae7ac4 (diff)
downloadmariadb-git-3ae219848322dea1e42b9ba25e3066bbc9aa217d.tar.gz
Bug #19811005 ALTER TABLE ADD INDEX DOES NOT UPDATE INDEX_LENGTH IN I_S TABLES
PROBLEM ======= An add index doesn't update index length stats in information schema TABLES table. FIX === Update the dict_table_t variable with index length stats that is actually calculated post alter . As this variable is used to populated the information schema index length statistics. Reviewed by: Bin su<bin.x.su@oracle.com> RB: 21277
Diffstat (limited to 'storage/innobase')
-rw-r--r--storage/innobase/dict/dict0stats.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc
index 364add4791d..06364689173 100644
--- a/storage/innobase/dict/dict0stats.cc
+++ b/storage/innobase/dict/dict0stats.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2009, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2009, 2019, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
@@ -2499,7 +2499,6 @@ dict_stats_report_error(
return (err);
}
-
/** Save the table's statistics into the persistent statistics storage.
@param[in] table_orig table whose stats to save
@param[in] only_for_index if this is non-NULL, then stats for indexes
@@ -3208,6 +3207,8 @@ dict_stats_update_for_index(
if (dict_stats_persistent_storage_check(false)) {
dict_table_stats_lock(index->table, RW_X_LATCH);
dict_stats_analyze_index(index);
+ index->table->stat_sum_of_other_index_sizes
+ += index->stat_index_size;
dict_table_stats_unlock(index->table, RW_X_LATCH);
dict_stats_save(index->table, &index->id);
DBUG_VOID_RETURN;