summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim OLeary <jim.oleary@gmail.com>2022-06-02 16:53:17 +0100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-06-02 18:14:59 +0000
commitcdd021f3c1d66a1772b1968e84dff7f4e8799c9e (patch)
tree8d8889bebefc196bebb9ac72efcaf2bf75ae13c0 /src
parenta1aea073949549618cdde2c7c427270889278ba4 (diff)
downloadmongo-cdd021f3c1d66a1772b1968e84dff7f4e8799c9e.tar.gz
Revert "Import wiredtiger: d1d727c13a756f0a4f7895f7bf77167610d4c4c1 from branch mongodb-master"
This reverts commit 520b01685461b36727f3cfa6b3e628d8bf36ad1d.
Diffstat (limited to 'src')
-rw-r--r--src/third_party/wiredtiger/cmake/configs/x86/windows/config.cmake2
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/include/msvc.h40
-rw-r--r--src/third_party/wiredtiger/src/reconcile/rec_track.c4
-rwxr-xr-xsrc/third_party/wiredtiger/test/evergreen.yml3
-rw-r--r--src/third_party/wiredtiger/test/evergreen/build_windows.ps13
-rw-r--r--src/third_party/wiredtiger/test/unittest/tests/test_reconciliation_tracking.cpp2
-rw-r--r--src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.cpp15
-rw-r--r--src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.h4
-rw-r--r--src/third_party/wiredtiger/test/windows/windows_shim.h1
10 files changed, 24 insertions, 52 deletions
diff --git a/src/third_party/wiredtiger/cmake/configs/x86/windows/config.cmake b/src/third_party/wiredtiger/cmake/configs/x86/windows/config.cmake
index f5e92e689ee..695052591c9 100644
--- a/src/third_party/wiredtiger/cmake/configs/x86/windows/config.cmake
+++ b/src/third_party/wiredtiger/cmake/configs/x86/windows/config.cmake
@@ -8,6 +8,8 @@ set(ENABLE_STATIC ON CACHE BOOL "" FORCE)
set(ENABLE_SHARED OFF CACHE BOOL "" FORCE)
set(WITH_PIC ON CACHE BOOL "" FORCE)
+# Compile as C code .
+add_compile_options(/TC)
# Inline expansion.
add_compile_options(/Ob1)
# Enable string pooling.
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 332be71af57..27560ad191a 100644
--- a/src/third_party/wiredtiger/import.data
+++ b/src/third_party/wiredtiger/import.data
@@ -2,5 +2,5 @@
"vendor": "wiredtiger",
"github": "wiredtiger/wiredtiger.git",
"branch": "mongodb-master",
- "commit": "d1d727c13a756f0a4f7895f7bf77167610d4c4c1"
+ "commit": "81fe6d40931947a1961cc3b9c96a1f31f343dbc9"
}
diff --git a/src/third_party/wiredtiger/src/include/msvc.h b/src/third_party/wiredtiger/src/include/msvc.h
index f2f861f1bf1..9823313035c 100644
--- a/src/third_party/wiredtiger/src/include/msvc.h
+++ b/src/third_party/wiredtiger/src/include/msvc.h
@@ -11,9 +11,7 @@
#error "Only x64 is supported with MSVC"
#endif
-#ifndef __cplusplus
#define inline __inline
-#endif
/* MSVC Doesn't provide __PRETTY_FUNCTION__, it has __FUNCSIG__ */
#ifdef _MSC_VER
@@ -34,23 +32,22 @@
#define WT_GCC_FUNC_ATTRIBUTE(x)
#define WT_GCC_FUNC_DECL_ATTRIBUTE(x)
-#define WT_ATOMIC_FUNC(name, ret, type, s, t) \
- static inline ret __wt_atomic_add##name(type *vp, type v) \
- { \
- return (_InterlockedExchangeAdd##s((t *)(vp), (t)(v)) + (v)); \
- } \
- static inline ret __wt_atomic_fetch_add##name(type *vp, type v) \
- { \
- return (_InterlockedExchangeAdd##s((t *)(vp), (t)(v))); \
- } \
- static inline ret __wt_atomic_sub##name(type *vp, type v) \
- { \
- return (_InterlockedExchangeAdd##s((t *)(vp), -(t)v) - (v)); \
- } \
- static inline bool __wt_atomic_cas##name(type *vp, type old_val, type new_val) \
- { \
- return ( \
- _InterlockedCompareExchange##s((t *)(vp), (t)(new_val), (t)(old_val)) == (t)(old_val)); \
+#define WT_ATOMIC_FUNC(name, ret, type, s, t) \
+ static inline ret __wt_atomic_add##name(type *vp, type v) \
+ { \
+ return (_InterlockedExchangeAdd##s((t *)(vp), (t)(v)) + (v)); \
+ } \
+ static inline ret __wt_atomic_fetch_add##name(type *vp, type v) \
+ { \
+ return (_InterlockedExchangeAdd##s((t *)(vp), (t)(v))); \
+ } \
+ static inline ret __wt_atomic_sub##name(type *vp, type v) \
+ { \
+ return (_InterlockedExchangeAdd##s((t *)(vp), -(t)v) - (v)); \
+ } \
+ static inline bool __wt_atomic_cas##name(type *vp, type old, type new) \
+ { \
+ return (_InterlockedCompareExchange##s((t *)(vp), (t)(new), (t)(old)) == (t)(old)); \
}
WT_ATOMIC_FUNC(8, uint8_t, uint8_t, 8, char)
@@ -71,10 +68,9 @@ WT_ATOMIC_FUNC(size, size_t, size_t, 64, __int64)
* Pointer compare and swap.
*/
static inline bool
-__wt_atomic_cas_ptr(void *vp, void *old_val, void *new_val)
+__wt_atomic_cas_ptr(void *vp, void *old, void *new)
{
- return (_InterlockedCompareExchange64(
- (volatile __int64 *)vp, (int64_t)new_val, (int64_t)old_val) == ((int64_t)old_val));
+ return (_InterlockedCompareExchange64(vp, (int64_t) new, (int64_t)old) == ((int64_t)old));
}
/*
diff --git a/src/third_party/wiredtiger/src/reconcile/rec_track.c b/src/third_party/wiredtiger/src/reconcile/rec_track.c
index 72d2e2388ab..d10590d453c 100644
--- a/src/third_party/wiredtiger/src/reconcile/rec_track.c
+++ b/src/third_party/wiredtiger/src/reconcile/rec_track.c
@@ -34,10 +34,6 @@ __ovfl_discard_verbose(WT_SESSION_IMPL *session, WT_PAGE *page, WT_CELL *cell, c
WT_CELL_UNPACK_KV *unpack, _unpack;
WT_DECL_ITEM(tmp);
- /* Because we dereference the page pointer, it can't be NULL */
- if (page == NULL)
- WT_RET(EINVAL);
-
WT_RET(__wt_scr_alloc(session, 512, &tmp));
unpack = &_unpack;
diff --git a/src/third_party/wiredtiger/test/evergreen.yml b/src/third_party/wiredtiger/test/evergreen.yml
index 105abffe6d7..d431af14ddf 100755
--- a/src/third_party/wiredtiger/test/evergreen.yml
+++ b/src/third_party/wiredtiger/test/evergreen.yml
@@ -1030,8 +1030,6 @@ tasks:
- func: "compile wiredtiger"
vars:
posix_configure_flags: -DENABLE_STRICT=1 -DHAVE_DIAGNOSTIC=1 -DENABLE_LZ4=1 -DENABLE_SNAPPY=1 -DENABLE_ZLIB=1 -DHAVE_UNITTEST=1
- # Different flags for windows based on what is supported and enabled by default.
- windows_configure_flags: -DHAVE_DIAGNOSTIC=1 -DHAVE_UNITTEST=1
- command: shell.exec
params:
working_dir: "wiredtiger/cmake_build"
@@ -4355,7 +4353,6 @@ buildvariants:
- name: make-check-test
- name: ".unit_test"
- name: fops
- - name: unittest-test
- name: macos-1014
display_name: "OS X 10.14"
diff --git a/src/third_party/wiredtiger/test/evergreen/build_windows.ps1 b/src/third_party/wiredtiger/test/evergreen/build_windows.ps1
index 56a68b0ab55..001a93dbab4 100644
--- a/src/third_party/wiredtiger/test/evergreen/build_windows.ps1
+++ b/src/third_party/wiredtiger/test/evergreen/build_windows.ps1
@@ -27,8 +27,7 @@ cd cmake_build
# Configure build with CMake.
if( $configure -eq $true) {
- # Note that ${args} are all the command line options that are not automatically parsed by the param function.
- C:\cmake\bin\cmake --no-warn-unused-cli -DSWIG_DIR='C:\swigwin-3.0.2' -DSWIG_EXECUTABLE='C:\swigwin-3.0.2\swig.exe' -DCMAKE_BUILD_TYPE='None' -DENABLE_PYTHON=1 -DENABLE_STRICT=1 -DCMAKE_TOOLCHAIN_FILE='..\cmake\toolchains\cl.cmake' ${args} -G "Ninja" ..\.
+ C:\cmake\bin\cmake --no-warn-unused-cli -DSWIG_DIR="C:\swigwin-3.0.2" -DSWIG_EXECUTABLE="C:\swigwin-3.0.2\swig.exe" -DCMAKE_BUILD_TYPE='None' -DENABLE_PYTHON=1 -DENABLE_STRICT=1 -DCMAKE_TOOLCHAIN_FILE='..\cmake\toolchains\cl.cmake' -G "Ninja" ..\.
}
# Execute Ninja build.
diff --git a/src/third_party/wiredtiger/test/unittest/tests/test_reconciliation_tracking.cpp b/src/third_party/wiredtiger/test/unittest/tests/test_reconciliation_tracking.cpp
index a3461ccd814..59dfebc19ba 100644
--- a/src/third_party/wiredtiger/test/unittest/tests/test_reconciliation_tracking.cpp
+++ b/src/third_party/wiredtiger/test/unittest/tests/test_reconciliation_tracking.cpp
@@ -37,7 +37,7 @@ TEST_CASE("Reconciliation tracking: ovfl_discard_verbose", "[reconciliation]")
SECTION("handle null page and tag")
{
- REQUIRE(__ut_ovfl_discard_verbose(session, nullptr, nullptr, nullptr) == EINVAL);
+ REQUIRE(__ut_ovfl_discard_verbose(session, nullptr, nullptr, nullptr) == 0);
}
}
diff --git a/src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.cpp b/src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.cpp
index 0bb79182546..81d838d7f3b 100644
--- a/src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.cpp
+++ b/src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.cpp
@@ -16,20 +16,7 @@
ConnectionWrapper::ConnectionWrapper(const std::string &db_home)
: _conn_impl(nullptr), _conn(nullptr), _db_home(db_home)
{
- struct stat sb;
- /*
- * Check if the DB Home exists and is a directory, without this the mkdir can fail on some
- * platforms (win).
- */
- if (stat(_db_home.c_str(), &sb) == 0) {
- if (!S_ISDIR(sb.st_mode)) {
- std::string errorMessage("Path exists and is not a directory: " + db_home);
- throw std::runtime_error(errorMessage);
- }
- /* We are happy that it is an existing directory. */
- } else {
- utils::throwIfNonZero(mkdir(_db_home.c_str(), 0700));
- }
+ utils::throwIfNonZero(mkdir(_db_home.c_str(), 0700));
utils::throwIfNonZero(wiredtiger_open(_db_home.c_str(), nullptr, "create", &_conn));
}
diff --git a/src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.h b/src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.h
index c064639a903..1093e4465d9 100644
--- a/src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.h
+++ b/src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.h
@@ -13,10 +13,6 @@
#include <string>
#include "wt_internal.h"
-#ifdef _WIN32
-#include "windows_shim.h"
-#endif
-
/*
* Prefer a "real" class over a mock class when you need a fully fleshed-out connection or session.
* There's a speed cost to this, since it will write a bunch of files to disk during the test, which
diff --git a/src/third_party/wiredtiger/test/windows/windows_shim.h b/src/third_party/wiredtiger/test/windows/windows_shim.h
index 06b60360c69..15bd2ac19dc 100644
--- a/src/third_party/wiredtiger/test/windows/windows_shim.h
+++ b/src/third_party/wiredtiger/test/windows/windows_shim.h
@@ -44,7 +44,6 @@
* Emulate <sys/stat.h>
*/
#define mkdir(path, mode) _mkdir(path)
-#define S_ISDIR(mode) ((mode & _S_IFDIR) == _S_IFDIR)
/*
* Emulate <sys/time.h>