diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2018-08-31 13:21:46 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2018-08-31 13:21:46 +0300 |
commit | a55309d9268273030b388d2e7ca6ae04b28a710b (patch) | |
tree | cbdec8272c27e6a27a39097a7cc889f036e94a37 /storage/rocksdb | |
parent | 2770eb1b56be7d6bae677aeb386131d80161c832 (diff) | |
download | mariadb-git-a55309d9268273030b388d2e7ca6ae04b28a710b.tar.gz |
MyRocks: post-merge fixes: Make it compile on Windows.
Diffstat (limited to 'storage/rocksdb')
-rw-r--r-- | storage/rocksdb/CMakeLists.txt | 9 | ||||
-rw-r--r-- | storage/rocksdb/ha_rocksdb.cc | 5 | ||||
-rw-r--r-- | 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 2689dc7151c..7aab8034b07 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 61561a67fcf..565bbf01d8b 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 36c949363a9..d541922dfd6 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", |