diff options
Diffstat (limited to 'storage/innobase/dict/dict0mem.cc')
-rw-r--r-- | storage/innobase/dict/dict0mem.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/storage/innobase/dict/dict0mem.cc b/storage/innobase/dict/dict0mem.cc index b39e1e171ee..f5bfd49e9f6 100644 --- a/storage/innobase/dict/dict0mem.cc +++ b/storage/innobase/dict/dict0mem.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -300,11 +300,20 @@ dict_mem_table_col_rename_low( char* col_names; if (to_len > from_len) { + ulint table_size_before_rename_col + = mem_heap_get_size(table->heap); col_names = static_cast<char*>( mem_heap_alloc( table->heap, full_len + to_len - from_len)); - + ulint table_size_after_rename_col + = mem_heap_get_size(table->heap); + if (table_size_before_rename_col + != table_size_after_rename_col) { + dict_sys->size += + table_size_after_rename_col + - table_size_before_rename_col; + } memcpy(col_names, table->col_names, prefix_len); } else { col_names = const_cast<char*>(table->col_names); |