diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2017-07-21 16:05:20 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2017-07-21 16:05:20 +0300 |
commit | 92cbe388b6839bc1e21abb9859c54c58fc1769cf (patch) | |
tree | e34c5a03f82d2feba7ea91d0d7ca7bd6de0ceb92 /storage/xtradb/include/dict0dict.h | |
parent | 0ec147b6174a8069c303a6d0bd4e3822fe16e4c2 (diff) | |
download | mariadb-git-92cbe388b6839bc1e21abb9859c54c58fc1769cf.tar.gz |
MDEV-13325: InnoDB assert dict_sys->size > 0 during ALTER TABLEbb-10.0-jan
Problem was that dict_sys->size tries to maintain used memory
occupied by the data dictionary table and index objects.
However at least on table objects table->heap size can increase
between when table object is inserted to dict_sys and when
it is removed from dict_sys causing inconsistency on amount
of memory added to and removed from dict_sys->size variable.
Removed unnecessary dict_sys:size variable as it is really
used only for status output.
Introduced dict_sys_get_size function to calculate memory
occupied by the data dictionary table and index objects
that is then used on show engine innodb output.
dict_table_add_to_cache(),
dict_table_rename_in_cache(),
dict_table_remove_from_cache_low(),
dict_index_remove_from_cache_low(),
Remove size calculation.
srv_printf_innodb_monitor(): Use dict_sys_get_size function to
get dictionary memory allocated.
xtradb_internal_hash_tables_fill_table(): Use dict_sys_get_size
function to get dictionary memory allocated.
Diffstat (limited to 'storage/xtradb/include/dict0dict.h')
-rw-r--r-- | storage/xtradb/include/dict0dict.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/storage/xtradb/include/dict0dict.h b/storage/xtradb/include/dict0dict.h index ef6c32b1787..33edab3ae98 100644 --- a/storage/xtradb/include/dict0dict.h +++ b/storage/xtradb/include/dict0dict.h @@ -1617,9 +1617,6 @@ struct dict_sys_t{ on name */ hash_table_t* table_id_hash; /*!< hash table of the tables, based on id */ - ulint size; /*!< varying space in bytes occupied - by the data dictionary table and - index objects */ dict_table_t* sys_tables; /*!< SYS_TABLES table */ dict_table_t* sys_columns; /*!< SYS_COLUMNS table */ dict_table_t* sys_indexes; /*!< SYS_INDEXES table */ @@ -1863,6 +1860,13 @@ dict_table_get_index_on_first_col( ulint col_index); /*!< in: position of column in table */ +/** Calculate the used memory occupied by the data dictionary +table and index objects. +@return number of bytes occupied. */ +UNIV_INTERN +ulint +dict_sys_get_size(); + #endif /* !UNIV_HOTBACKUP */ /************************************************************************* set is_corrupt flag by space_id*/ |