From 2754ec9994304116d6c0e3a04b6280a74ed0b4d8 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Mon, 21 Sep 2015 16:21:01 -0700 Subject: [PATCH] Fix Windows constexpr issue and '#ifdef' column_family_test in Release. --- db/column_family_test.cc | 7 +++++++ .../write_batch_with_index_internal.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/db/column_family_test.cc b/db/column_family_test.cc index 938c4121a..a258b83df 100644 --- a/db/column_family_test.cc +++ b/db/column_family_test.cc @@ -23,6 +23,8 @@ #include "util/sync_point.h" #include "utilities/merge_operators.h" +#if !(defined NDEBUG) || !defined(OS_WIN) + namespace rocksdb { namespace { @@ -1260,8 +1262,13 @@ TEST_F(ColumnFamilyTest, FlushAndDropRaceCondition) { } } // namespace rocksdb +#endif int main(int argc, char** argv) { +#if !(defined NDEBUG) || !defined(OS_WIN) ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); +#else + return 0; +#endif } diff --git a/utilities/write_batch_with_index/write_batch_with_index_internal.h b/utilities/write_batch_with_index/write_batch_with_index_internal.h index 3c894ebbb..5fdb9035a 100644 --- a/utilities/write_batch_with_index/write_batch_with_index_internal.h +++ b/utilities/write_batch_with_index/write_batch_with_index_internal.h @@ -30,7 +30,7 @@ struct WriteBatchIndexEntry { // If this flag appears in the offset, it indicates a key that is smaller // than any other entry for the same column family - static const size_t kFlagMin = std::numeric_limits::max(); + static const size_t kFlagMin = UINT64_MAX; size_t offset; // offset of an entry in write batch's string buffer. uint32_t column_family; // column family of the entry