Skip to content

Commit a51a703

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 c234b22 commit a51a703

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
@@ -9826,17 +9826,17 @@ bool Fil_system::lookup_for_recovery(space_id_t space_id) {
98269826
because get_scanned_filename_by_space_id has not found it. But it
98279827
could not be a known space_id now, it would mean something went
98289828
quite wrong. */
9829-
ut_a(!recv_sys->missing_ids.contains(space_id));
9829+
ut_a(recv_sys->missing_ids.count(space_id) == 0);
98309830

98319831
/* Every time a space_id is marked deleted, the path
98329832
is also removed from m_dirs. */
9833-
ut_a(!recv_sys->deleted.contains(space_id));
9833+
ut_a(recv_sys->deleted.count(space_id) == 0);
98349834
} else {
98359835
/* Should belong to exactly one of `deleted` or `missing_ids`, as whenever
98369836
adding to deleted we remove from missing_ids, and
98379837
we add to missing_ids only if it's not in deleted. */
9838-
if (recv_sys->deleted.contains(space_id)) {
9839-
ut_a(!recv_sys->missing_ids.contains(space_id));
9838+
if (recv_sys->deleted.count(space_id) != 0) {
9839+
ut_a(recv_sys->missing_ids.count(space_id) == 0);
98409840
} else {
98419841
recv_sys->missing_ids.insert(space_id);
98429842
}
@@ -9966,7 +9966,7 @@ Fil_state fil_tablespace_path_equals(space_id_t space_id,
99669966
never reach here with deleted space. We are running in context of threads of
99679967
DD validation. No one is modifying this data in parallel
99689968
so it is safe to read it without mutex protection. */
9969-
ut_a(!recv_sys->deleted.contains(space_id));
9969+
ut_a(recv_sys->deleted.count(space_id) == 0);
99709970

99719971
/* A file with this space_id was found during scanning.
99729972
Validate its location and check if it was moved from where
@@ -10125,7 +10125,7 @@ bool Fil_system::check_missing_tablespaces() {
1012510125
an id into it, we remove it from recv_sys->missing_ids, and we insert into
1012610126
recv_sys->missing_ids only if it's not in recv_sys->deleted.
1012710127
No space id should be present in both containers. */
10128-
ut_a(!recv_sys->deleted.contains(space_id));
10128+
ut_a(recv_sys->deleted.count(space_id) == 0);
1012910129

1013010130
const auto result = get_scanned_filename_by_space_id(space_id).second;
1013110131

0 commit comments

Comments
 (0)