diff options
author | Eugene Kosov <claprix@yandex.ru> | 2021-06-25 18:00:47 +0300 |
---|---|---|
committer | Eugene Kosov <claprix@yandex.ru> | 2021-07-20 19:32:33 +0300 |
commit | 7da1cfb07a0dfec08b861688640bbbb7779549f6 (patch) | |
tree | 8d2ba78a14a50aa9f6bcc1d19ed6e3eb22c48b51 /extra | |
parent | 1918bdf32cdbd1f190cc4479f4076ee4a467f25d (diff) | |
download | mariadb-git-7da1cfb07a0dfec08b861688640bbbb7779549f6.tar.gz |
avoid searching std::map twice in innochecksum
Diffstat (limited to 'extra')
-rw-r--r-- | extra/innochecksum.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc index beda56032b8..3eea1244429 100644 --- a/extra/innochecksum.cc +++ b/extra/innochecksum.cc @@ -912,12 +912,7 @@ parse_page( } /* update per-index statistics */ { - if (index_ids.count(id) == 0) { - index_ids[id] = per_index_stats(); - } - std::map<unsigned long long, per_index_stats>::iterator it; - it = index_ids.find(id); - per_index_stats &index = (it->second); + per_index_stats &index = index_ids[id]; if (page_is_free(xdes, page_size, page_no)) { index.free_pages++; return; |