diff options
| author | Eugene Kosov <claprix@yandex.ru> | 2019-03-14 17:28:20 +0300 |
|---|---|---|
| committer | Sergei Golubchik <serg@mariadb.org> | 2019-04-03 18:36:33 +0200 |
| commit | 3a3d5ba2356b85626d34d6a65e4d8e8e6205b60d (patch) | |
| tree | c48ac8edf90d3c9ca04d1c9ccc8efec1bb96ecd2 /sql/mem_root_array.h | |
| parent | 5d8ca989974734e931cf247434e9f96297e4af4d (diff) | |
| download | mariadb-git-3a3d5ba2356b85626d34d6a65e4d8e8e6205b60d.tar.gz | |
MDEV-13301 Optimize DROP INDEX, ADD INDEX into RENAME INDEX
Just rename index in data dictionary and in InnoDB cache when it's possible.
Introduce ALTER_INDEX_RENAME for that purpose so that engines can optimize
such operation.
Unused code between macro MYSQL_RENAME_INDEX was removed.
compare_keys_but_name(): compare index definitions except for index names
Alter_inplace_info::rename_keys:
ha_innobase_inplace_ctx::rename_keys: vector of rename indexes
fill_alter_inplace_info():: fills Alter_inplace_info::rename_keys
Diffstat (limited to 'sql/mem_root_array.h')
| -rw-r--r-- | sql/mem_root_array.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/mem_root_array.h b/sql/mem_root_array.h index 5daeedadcba..bf266a60334 100644 --- a/sql/mem_root_array.h +++ b/sql/mem_root_array.h @@ -87,9 +87,11 @@ public: // Returns a pointer to the first element in the array. Element_type *begin() { return &m_array[0]; } + const Element_type *begin() const { return &m_array[0]; } // Returns a pointer to the past-the-end element in the array. Element_type *end() { return &m_array[size()]; } + const Element_type *end() const { return &m_array[size()]; } // Erases all of the elements. void clear() @@ -226,6 +228,7 @@ public: size_t element_size() const { return sizeof(Element_type); } bool empty() const { return size() == 0; } size_t size() const { return m_size; } + const MEM_ROOT *mem_root() const { return m_root; } private: MEM_ROOT *const m_root; |
