• Jan Lindström's avatar
    MDEV-13325: InnoDB assert dict_sys->size > 0 during ALTER TABLE · 92cbe388
    Jan Lindström authored
    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.
    92cbe388
srv0srv.cc 83.3 KB