diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2020-03-19 00:29:44 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2020-03-23 11:25:01 +0100 |
commit | 82b3f1a80fed2df9d46f12978bbded2bca0e758d (patch) | |
tree | f19a98c98bb5d0f25b6c8ab87016a25d3d092ce4 /storage | |
parent | ad6e421bd2ef2c63ea673da387276f74c23b7f5b (diff) | |
download | mariadb-git-82b3f1a80fed2df9d46f12978bbded2bca0e758d.tar.gz |
MDEV-21930 RocksDB does not compile anymore, with Visual Studio
Update submodule, change the source file list
rename CACHE_LINE_SIZE in ut0counter, so it does not conflics with
rocksdb sources, which also defines this constant now.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/rocksdb/build_rocksdb.cmake | 89 | ||||
-rw-r--r-- | storage/rocksdb/rdb_sst_info.cc | 2 | ||||
m--------- | storage/rocksdb/rocksdb | 0 | ||||
-rw-r--r-- | storage/rocksdb/ut0counter.h | 12 |
4 files changed, 61 insertions, 42 deletions
diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake index 70b7c97f69c..115af45fec3 100644 --- a/storage/rocksdb/build_rocksdb.cmake +++ b/storage/rocksdb/build_rocksdb.cmake @@ -60,10 +60,10 @@ if(BZIP2_FOUND AND (NOT WITH_ROCKSDB_BZIP2 STREQUAL "OFF")) list(APPEND THIRDPARTY_LIBS ${BZIP2_LIBRARIES}) endif() -if(SNAPPY_FOUND AND (NOT WITH_ROCKSDB_SNAPPY STREQUAL "OFF")) +if(snappy_FOUND AND (NOT WITH_ROCKSDB_SNAPPY STREQUAL "OFF")) add_definitions(-DSNAPPY) - include_directories(${SNAPPY_INCLUDE_DIR}) - list(APPEND THIRDPARTY_LIBS ${SNAPPY_LIBRARIES}) + include_directories(${snappy_INCLUDE_DIR}) + list(APPEND THIRDPARTY_LIBS ${snappy_LIBRARIES}) endif() include(CheckFunctionExists) @@ -189,31 +189,32 @@ set(ROCKSDB_SOURCES cache/clock_cache.cc cache/lru_cache.cc cache/sharded_cache.cc + db/arena_wrapped_db_iter.cc db/builder.cc db/c.cc db/column_family.cc db/compacted_db_impl.cc db/compaction/compaction.cc db/compaction/compaction_iterator.cc - db/compaction/compaction_job.cc db/compaction/compaction_picker.cc + db/compaction/compaction_job.cc db/compaction/compaction_picker_fifo.cc db/compaction/compaction_picker_level.cc db/compaction/compaction_picker_universal.cc db/convenience.cc db/db_filesnapshot.cc - db/dbformat.cc db/db_impl/db_impl.cc + db/db_impl/db_impl_write.cc db/db_impl/db_impl_compaction_flush.cc - db/db_impl/db_impl_debug.cc - db/db_impl/db_impl_experimental.cc db/db_impl/db_impl_files.cc db/db_impl/db_impl_open.cc + db/db_impl/db_impl_debug.cc + db/db_impl/db_impl_experimental.cc db/db_impl/db_impl_readonly.cc db/db_impl/db_impl_secondary.cc - db/db_impl/db_impl_write.cc db/db_info_dumper.cc db/db_iter.cc + db/dbformat.cc db/error_handler.cc db/event_helpers.cc db/experimental.cc @@ -222,9 +223,10 @@ set(ROCKSDB_SOURCES db/flush_job.cc db/flush_scheduler.cc db/forward_iterator.cc + db/import_column_family_job.cc db/internal_stats.cc - db/log_reader.cc db/logs_with_prep_tracker.cc + db/log_reader.cc db/log_writer.cc db/malloc_stats.cc db/memtable.cc @@ -238,22 +240,31 @@ set(ROCKSDB_SOURCES db/table_cache.cc db/table_properties_collector.cc db/transaction_log_impl.cc + db/trim_history_scheduler.cc db/version_builder.cc db/version_edit.cc db/version_set.cc db/wal_manager.cc - db/write_batch_base.cc db/write_batch.cc + db/write_batch_base.cc db/write_controller.cc db/write_thread.cc env/env.cc env/env_chroot.cc + env/env_encryption.cc env/env_hdfs.cc + env/file_system.cc env/mock_env.cc file/delete_scheduler.cc - file/filename.cc + file/file_prefetch_buffer.cc file/file_util.cc + file/filename.cc + file/random_access_file_reader.cc + file/read_write_util.cc + file/readahead_raf.cc + file/sequence_file_reader.cc file/sst_file_manager_impl.cc + file/writable_file_writer.cc logging/auto_roll_logger.cc logging/event_logger.cc logging/log_buffer.cc @@ -268,8 +279,8 @@ set(ROCKSDB_SOURCES memtable/write_buffer_manager.cc monitoring/histogram.cc monitoring/histogram_windowing.cc - monitoring/instrumented_mutex.cc monitoring/in_memory_stats_history.cc + monitoring/instrumented_mutex.cc monitoring/iostats_context.cc monitoring/perf_context.cc monitoring/perf_level.cc @@ -277,7 +288,6 @@ set(ROCKSDB_SOURCES monitoring/statistics.cc monitoring/thread_status_impl.cc monitoring/thread_status_updater.cc - monitoring/thread_status_updater_debug.cc monitoring/thread_status_util.cc monitoring/thread_status_util_debug.cc options/cf_options.cc @@ -288,21 +298,24 @@ set(ROCKSDB_SOURCES options/options_sanity_check.cc port/stack_trace.cc table/adaptive/adaptive_table_factory.cc + table/block_based/block.cc table/block_based/block_based_filter_block.cc table/block_based/block_based_table_builder.cc table/block_based/block_based_table_factory.cc table/block_based/block_based_table_reader.cc table/block_based/block_builder.cc - table/block_based/block.cc table/block_based/block_prefix_index.cc - table/block_based/data_block_footer.cc table/block_based/data_block_hash_index.cc + table/block_based/data_block_footer.cc + table/block_based/filter_block_reader_common.cc + table/block_based/filter_policy.cc table/block_based/flush_block_policy.cc table/block_based/full_filter_block.cc table/block_based/index_builder.cc + table/block_based/parsed_full_filter_block.cc table/block_based/partitioned_filter_block.cc + table/block_based/uncompression_dict_reader.cc table/block_fetcher.cc - table/bloom_block.cc table/cuckoo/cuckoo_table_builder.cc table/cuckoo/cuckoo_table_factory.cc table/cuckoo/cuckoo_table_reader.cc @@ -312,6 +325,7 @@ set(ROCKSDB_SOURCES table/merging_iterator.cc table/meta_blocks.cc table/persistent_cache_helper.cc + table/plain/plain_table_bloom.cc table/plain/plain_table_builder.cc table/plain/plain_table_factory.cc table/plain/plain_table_index.cc @@ -323,23 +337,34 @@ set(ROCKSDB_SOURCES table/two_level_iterator.cc test_util/sync_point.cc test_util/sync_point_impl.cc + test_util/testutil.cc + test_util/transaction_test_util.cc + tools/block_cache_analyzer/block_cache_trace_analyzer.cc + tools/dump/db_dump_tool.cc tools/ldb_cmd.cc tools/ldb_tool.cc tools/sst_dump_tool.cc - trace_replay/block_cache_tracer.cc + tools/trace_analyzer_tool.cc trace_replay/trace_replay.cc - util/bloom.cc + trace_replay/block_cache_tracer.cc util/coding.cc util/compaction_job_stats_impl.cc util/comparator.cc util/compression_context_cache.cc util/concurrent_task_limiter_impl.cc - util/crc32c_arm64.cc util/crc32c.cc util/dynamic_bloom.cc - util/file_reader_writer.cc - util/filter_policy.cc util/hash.cc + util/murmurhash.cc + util/random.cc + util/rate_limiter.cc + util/slice.cc + util/file_checksum_helper.cc + util/status.cc + util/string_util.cc + util/thread_local.cc + util/threadpool_imp.cc + util/xxhash.cc utilities/backupable/backupable_db.cc utilities/blob_db/blob_compaction_filter.cc utilities/blob_db/blob_db.cc @@ -347,12 +372,11 @@ set(ROCKSDB_SOURCES utilities/blob_db/blob_db_impl_filesnapshot.cc utilities/blob_db/blob_dump_tool.cc utilities/blob_db/blob_file.cc - utilities/blob_db/blob_log_format.cc utilities/blob_db/blob_log_reader.cc utilities/blob_db/blob_log_writer.cc + utilities/blob_db/blob_log_format.cc utilities/checkpoint/checkpoint_impl.cc utilities/compaction_filters/remove_emptyvalue_compactionfilter.cc - utilities/convenience/info_log_finder.cc utilities/debug.cc utilities/env_mirror.cc utilities/env_timed.cc @@ -361,9 +385,11 @@ set(ROCKSDB_SOURCES utilities/merge_operators/bytesxor.cc utilities/merge_operators/max.cc utilities/merge_operators/put.cc - utilities/merge_operators/string_append/stringappend2.cc + utilities/merge_operators/sortlist.cc utilities/merge_operators/string_append/stringappend.cc + utilities/merge_operators/string_append/stringappend2.cc utilities/merge_operators/uint64add.cc + utilities/object_registry.cc utilities/option_change_migration/option_change_migration.cc utilities/options/options_util.cc utilities/persistent_cache/block_cache_tier.cc @@ -371,11 +397,12 @@ set(ROCKSDB_SOURCES utilities/persistent_cache/block_cache_tier_metadata.cc utilities/persistent_cache/persistent_cache_tier.cc utilities/persistent_cache/volatile_tier_impl.cc + utilities/simulator_cache/cache_simulator.cc utilities/simulator_cache/sim_cache.cc utilities/table_properties_collectors/compact_on_deletion_collector.cc utilities/trace/file_trace_reader_writer.cc - utilities/transactions/optimistic_transaction.cc utilities/transactions/optimistic_transaction_db_impl.cc + utilities/transactions/optimistic_transaction.cc utilities/transactions/pessimistic_transaction.cc utilities/transactions/pessimistic_transaction_db.cc utilities/transactions/snapshot_checker.cc @@ -390,15 +417,6 @@ set(ROCKSDB_SOURCES utilities/ttl/db_ttl_impl.cc utilities/write_batch_with_index/write_batch_with_index.cc utilities/write_batch_with_index/write_batch_with_index_internal.cc - util/murmurhash.cc - util/random.cc - util/rate_limiter.cc - util/slice.cc - util/status.cc - util/string_util.cc - util/thread_local.cc - util/threadpool_imp.cc - util/xxhash.cc ) @@ -415,7 +433,8 @@ else() list(APPEND ROCKSDB_SOURCES port/port_posix.cc env/env_posix.cc - env/io_posix.cc) + env/io_posix.cc + env/fs_posix.cc) # ppc64 or ppc64le if(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64") enable_language(ASM) diff --git a/storage/rocksdb/rdb_sst_info.cc b/storage/rocksdb/rdb_sst_info.cc index 8b7886667eb..f7e944c2e39 100644 --- a/storage/rocksdb/rdb_sst_info.cc +++ b/storage/rocksdb/rdb_sst_info.cc @@ -507,7 +507,7 @@ void Rdb_sst_info::set_error_msg(const std::string &sst_file_name, void Rdb_sst_info::report_error_msg(const rocksdb::Status &s, const char *sst_file_name) { if (s.IsInvalidArgument() && - strcmp(s.getState(), "Keys must be added in order") == 0) { + strcmp(s.getState(), "Keys must be added in strict ascending order.") == 0) { my_printf_error(ER_KEYS_OUT_OF_ORDER, "Rows must be inserted in primary key order " "during bulk load operation", diff --git a/storage/rocksdb/rocksdb b/storage/rocksdb/rocksdb -Subproject e731f4402258554812c46334dc0d9483e6cc769 +Subproject bba5e7bc21093d7cfa765e1280a7c4fdcd28428 diff --git a/storage/rocksdb/ut0counter.h b/storage/rocksdb/ut0counter.h index cfa474e7a99..3a7ee85d01c 100644 --- a/storage/rocksdb/ut0counter.h +++ b/storage/rocksdb/ut0counter.h @@ -23,7 +23,7 @@ Created 2012/04/12 by Sunny Bains #include <string.h> /** CPU cache line size */ -#define CACHE_LINE_SIZE 64 +#define UT_CACHE_LINE_SIZE 64 /** Default number of slots to use in ib_counter_t */ #define IB_N_SLOTS 64 @@ -43,7 +43,7 @@ struct generic_indexer_t { /** @return offset within m_counter */ size_t offset(size_t index) const { - return(((index % N) + 1) * (CACHE_LINE_SIZE / sizeof(Type))); + return(((index % N) + 1) * (UT_CACHE_LINE_SIZE / sizeof(Type))); } }; @@ -90,7 +90,7 @@ struct single_indexer_t { /** @return offset within m_counter */ size_t offset(size_t index) const { DBUG_ASSERT(N == 1); - return((CACHE_LINE_SIZE / sizeof(Type))); + return((UT_CACHE_LINE_SIZE / sizeof(Type))); } /* @return 1 */ @@ -103,7 +103,7 @@ struct single_indexer_t { /** Class for using fuzzy counters. The counter is not protected by any mutex and the results are not guaranteed to be 100% accurate but close enough. Creates an array of counters and separates each element by the -CACHE_LINE_SIZE bytes */ +UT_CACHE_LINE_SIZE bytes */ template < typename Type, int N = IB_N_SLOTS, @@ -119,7 +119,7 @@ public: bool validate() { #ifdef UNIV_DEBUG - size_t n = (CACHE_LINE_SIZE / sizeof(Type)); + size_t n = (UT_CACHE_LINE_SIZE / sizeof(Type)); /* Check that we aren't writing outside our defined bounds. */ for (size_t i = 0; i < UT_ARRAY_SIZE(m_counter); i += n) { @@ -197,7 +197,7 @@ private: Indexer<Type, N>m_policy; /** Slot 0 is unused. */ - Type m_counter[(N + 1) * (CACHE_LINE_SIZE / sizeof(Type))]; + Type m_counter[(N + 1) * (UT_CACHE_LINE_SIZE / sizeof(Type))]; }; #endif /* UT0COUNTER_H */ |