diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-21 12:44:23 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-21 12:44:23 +0300 |
commit | 9abc6fd73ff57c44c04bd5b18f9d1d99ddbce873 (patch) | |
tree | 7b1b2eb9c802fa202c86b9f420475b423c3cbb92 /storage/perfschema | |
parent | b59d07624c090235f3232529616458f11fb5b5c5 (diff) | |
download | mariadb-git-9abc6fd73ff57c44c04bd5b18f9d1d99ddbce873.tar.gz |
Cleanup: constexpr PFS_table_context::m_word_size
Diffstat (limited to 'storage/perfschema')
-rw-r--r-- | storage/perfschema/pfs_engine_table.cc | 6 | ||||
-rw-r--r-- | storage/perfschema/pfs_engine_table.h | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/storage/perfschema/pfs_engine_table.cc b/storage/perfschema/pfs_engine_table.cc index 20df5f31dc4..22ed3132c6b 100644 --- a/storage/perfschema/pfs_engine_table.cc +++ b/storage/perfschema/pfs_engine_table.cc @@ -154,7 +154,6 @@ bool PFS_table_context::initialize(void) m_map= context->m_map; DBUG_ASSERT(m_map_size == context->m_map_size); m_map_size= context->m_map_size; - m_word_size= context->m_word_size; } } else @@ -168,7 +167,6 @@ bool PFS_table_context::initialize(void) /* Initialize a new context, store in TLS. */ m_last_version= m_current_version; m_map= NULL; - m_word_size= sizeof(ulong) * 8; /* Allocate a bitmap to record which threads are materialized. */ if (m_map_size > 0) @@ -190,7 +188,7 @@ bool PFS_table_context::initialize(void) /* Constructor for global or single thread tables, map size = 0. */ PFS_table_context::PFS_table_context(ulonglong current_version, bool restore, thread_local_key_t key) : m_thr_key(key), m_current_version(current_version), m_last_version(0), - m_map(NULL), m_map_size(0), m_word_size(sizeof(ulong)), + m_map(NULL), m_map_size(0), m_restore(restore), m_initialized(false), m_last_item(0) { initialize(); @@ -199,7 +197,7 @@ PFS_table_context::PFS_table_context(ulonglong current_version, bool restore, th /* Constructor for by-thread or aggregate tables, map size = max thread/user/host/account. */ PFS_table_context::PFS_table_context(ulonglong current_version, ulong map_size, bool restore, thread_local_key_t key) : m_thr_key(key), m_current_version(current_version), m_last_version(0), - m_map(NULL), m_map_size(map_size), m_word_size(sizeof(ulong)), + m_map(NULL), m_map_size(map_size), m_restore(restore), m_initialized(false), m_last_item(0) { initialize(); diff --git a/storage/perfschema/pfs_engine_table.h b/storage/perfschema/pfs_engine_table.h index 89b723b08d7..883ff07c36c 100644 --- a/storage/perfschema/pfs_engine_table.h +++ b/storage/perfschema/pfs_engine_table.h @@ -74,7 +74,7 @@ private: ulonglong m_last_version; ulong *m_map; ulong m_map_size; - ulong m_word_size; + static constexpr ulong m_word_size= 8 * sizeof(ulong); bool m_restore; bool m_initialized; ulong m_last_item; |