Skip to content

Commit dcf89ab

Browse files
GBuelladahlerlend
authored andcommitted
Bug#35200385 The parallel tablespace scan in 8.0 doesn't work as expected [postfix]
Mysql 8.0 is built using C++17. Avoid using unordered_map::contains, as that is a C++20 library feature. Use count instead. Change-Id: I74f3c0d50db438847dfcdf23a5bff109c51809b7
1 parent e4b301a commit dcf89ab

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

storage/innobase/fil/fil0fil.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9767,17 +9767,17 @@ bool Fil_system::lookup_for_recovery(space_id_t space_id) {
97679767
because get_scanned_filename_by_space_id has not found it. But it
97689768
could not be a known space_id now, it would mean something went
97699769
quite wrong. */
9770-
ut_a(!recv_sys->missing_ids.contains(space_id));
9770+
ut_a(recv_sys->missing_ids.count(space_id) == 0);
97719771

97729772
/* Every time a space_id is marked deleted, the path
97739773
is also removed from m_dirs. */
9774-
ut_a(!recv_sys->deleted.contains(space_id));
9774+
ut_a(recv_sys->deleted.count(space_id) == 0);
97759775
} else {
97769776
/* Should belong to exactly one of `deleted` or `missing_ids`, as whenever
97779777
adding to deleted we remove from missing_ids, and
97789778
we add to missing_ids only if it's not in deleted. */
9779-
if (recv_sys->deleted.contains(space_id)) {
9780-
ut_a(!recv_sys->missing_ids.contains(space_id));
9779+
if (recv_sys->deleted.count(space_id) != 0) {
9780+
ut_a(recv_sys->missing_ids.count(space_id) == 0);
97819781
} else {
97829782
recv_sys->missing_ids.insert(space_id);
97839783
}
@@ -9907,7 +9907,7 @@ Fil_state fil_tablespace_path_equals(space_id_t space_id,
99079907
never reach here with deleted space. We are running in context of threads of
99089908
DD validation. No one is modifying this data in parallel
99099909
so it is safe to read it without mutex protection. */
9910-
ut_a(!recv_sys->deleted.contains(space_id));
9910+
ut_a(recv_sys->deleted.count(space_id) == 0);
99119911

99129912
/* A file with this space_id was found during scanning.
99139913
Validate its location and check if it was moved from where
@@ -10066,7 +10066,7 @@ bool Fil_system::check_missing_tablespaces() {
1006610066
an id into it, we remove it from recv_sys->missing_ids, and we insert into
1006710067
recv_sys->missing_ids only if it's not in recv_sys->deleted.
1006810068
No space id should be present in both containers. */
10069-
ut_a(!recv_sys->deleted.contains(space_id));
10069+
ut_a(recv_sys->deleted.count(space_id) == 0);
1007010070

1007110071
const auto result = get_scanned_filename_by_space_id(space_id).second;
1007210072

0 commit comments

Comments
 (0)