diff options
author | Sergei Golubchik <serg@mariadb.org> | 2021-09-12 15:23:34 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-09-12 15:42:49 +0200 |
commit | 1a6c130c4f157434e2272bacb680efa89eb4955e (patch) | |
tree | a225d8cd609d7d98a77cc4ea86bf097095a3dd87 | |
parent | 42e9506ce9d796921ec8bf023fe81fce1c3fc28d (diff) | |
download | mariadb-git-1a6c130c4f157434e2272bacb680efa89eb4955e.tar.gz |
perfschema: use correct type for left shifts
set_item() uses 1UL << bit, so is_set_item() must do the same.
This fixes sporadic perfschema.show_aggregate failures
(sporadic, because `bit` is the thread id, so depending on how many
tests were run before perfschema.show_aggregate it can be above or
below 32).
-rw-r--r-- | storage/perfschema/pfs_engine_table.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/perfschema/pfs_engine_table.cc b/storage/perfschema/pfs_engine_table.cc index 22ed3132c6b..c0b91cbb3b0 100644 --- a/storage/perfschema/pfs_engine_table.cc +++ b/storage/perfschema/pfs_engine_table.cc @@ -226,7 +226,7 @@ bool PFS_table_context::is_item_set(ulong n) { ulong word= n / m_word_size; ulong bit= n % m_word_size; - return (m_map[word] & (1 << bit)); + return (m_map[word] & (1UL << bit)); } |