[Commits] a55309d: MyRocks: post-merge fixes: Make it compile on Windows.
revision-id: a55309d9268273030b388d2e7ca6ae04b28a710b parent(s): 2770eb1b56be7d6bae677aeb386131d80161c832 committer: Sergei Petrunia branch nick: 10.2-mariarocks-merge timestamp: 2018-08-31 13:21:46 +0300 message: MyRocks: post-merge fixes: Make it compile on Windows. --- storage/rocksdb/CMakeLists.txt | 9 +++++++++ storage/rocksdb/ha_rocksdb.cc | 5 ++--- storage/rocksdb/rdb_i_s.cc | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt index 2689dc7..7aab803 100644 --- a/storage/rocksdb/CMakeLists.txt +++ b/storage/rocksdb/CMakeLists.txt @@ -43,6 +43,15 @@ IF (WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 4) SKIP_ROCKSDB_PLUGIN("32-Bit Windows are temporarily disabled") ENDIF() +# +# RocksDB's port/win/env_win.cc uses parts of Windows API that are not part +# of the LEAN_AND_MEAN set. Ideally we should undef LEAN_AND_MEAN only for +# that file, but REMOVE_DEFINITIONS only works per-directory? +# +IF (WIN32) + REMOVE_DEFINITIONS(-DWIN32_LEAN_AND_MEAN) +ENDIF() + # This plugin needs recent C++ compilers (it is using C++11 features) # Skip build for the old compilers SET(CXX11_FLAGS) diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index 61561a6..565bbf0 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -553,7 +553,7 @@ static char* rocksdb_git_hash; char *compression_types_val= const_cast<char*>(get_rocksdb_supported_compression_types()); -static uint64_t rocksdb_write_policy = +static unsigned long rocksdb_write_policy = rocksdb::TxnDBWritePolicy::WRITE_COMMITTED; static my_bool rocksdb_error_on_suboptimal_collation = 1; static uint32_t rocksdb_stats_recalc_rate = 0; @@ -13297,8 +13297,7 @@ void Rdb_manual_compaction_thread::run() { break; } timespec ts; - clock_gettime(CLOCK_REALTIME, &ts); - ts.tv_sec += 1; + set_timespec(ts, 1); const auto ret MY_ATTRIBUTE((__unused__)) = mysql_cond_timedwait(&m_signal_cond, &m_signal_mutex, &ts); diff --git a/storage/rocksdb/rdb_i_s.cc b/storage/rocksdb/rdb_i_s.cc index 36c9493..d541922 100644 --- a/storage/rocksdb/rdb_i_s.cc +++ b/storage/rocksdb/rdb_i_s.cc @@ -1909,7 +1909,7 @@ struct st_maria_plugin rdb_i_s_ddl = { MYROCKS_MARIADB_PLUGIN_MATURITY_LEVEL }; -struct st_mysql_plugin rdb_i_s_sst_props = { +struct st_maria_plugin rdb_i_s_sst_props = { MYSQL_INFORMATION_SCHEMA_PLUGIN, &rdb_i_s_info, "ROCKSDB_SST_PROPS",
participants (1)
-
psergey@askmonty.org