summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-02-22 08:40:54 +0100
committerSergei Golubchik <serg@mariadb.org>2018-02-22 08:40:54 +0100
commite119799a920e8096886a51ded305bf06609438a4 (patch)
tree6c3dfbeb197c8ef70ea0508b753cbf5db1210a4d
parent2daa00580096fc825dadcab7f04cfd5a8069927f (diff)
downloadmariadb-git-e119799a920e8096886a51ded305bf06609438a4.tar.gz
fix compilation wih -DPLUGIN_PARTITION=NO
rocksdb and spider
-rw-r--r--storage/rocksdb/ha_rocksdb.cc4
-rw-r--r--storage/rocksdb/rdb_datadic.cc2
-rw-r--r--storage/spider/CMakeLists.txt2
3 files changed, 5 insertions, 3 deletions
diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index bc15e948d41..5e4152f7dcf 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -6156,7 +6156,7 @@ int ha_rocksdb::create_cfs(
// Internal consistency check to make sure that data in TABLE and
// Rdb_tbl_def structures matches. Either both are missing or both are
// specified. Yes, this is critical enough to make it into SHIP_ASSERT.
- SHIP_ASSERT(!table_arg->part_info == tbl_def_arg->base_partition().empty());
+ SHIP_ASSERT(IF_PARTITIONING(!table_arg->part_info,true) == tbl_def_arg->base_partition().empty());
// Generate the name for the column family to use.
bool per_part_match_found = false;
@@ -8395,7 +8395,7 @@ const std::string ha_rocksdb::generate_cf_name(const uint index,
key_comment, table_arg, tbl_def_arg, per_part_match_found,
RDB_CF_NAME_QUALIFIER);
- if (table_arg->part_info != nullptr && !*per_part_match_found) {
+ if (IF_PARTITIONING(table_arg->part_info,nullptr) != nullptr && !*per_part_match_found) {
// At this point we tried to search for a custom CF name for a partition,
// but none was specified. Therefore default one will be used.
return "";
diff --git a/storage/rocksdb/rdb_datadic.cc b/storage/rocksdb/rdb_datadic.cc
index b2f5af705a3..68ad8e091b2 100644
--- a/storage/rocksdb/rdb_datadic.cc
+++ b/storage/rocksdb/rdb_datadic.cc
@@ -538,7 +538,7 @@ const std::string Rdb_key_def::parse_comment_for_qualifier(
// NOTE: this means if you specify a qualifier for a specific partition it
// will take precedence the 'table level' qualifier if one exists.
std::string search_str_part;
- if (table_arg->part_info != nullptr) {
+ if (IF_PARTITIONING(table_arg->part_info,nullptr) != nullptr) {
std::string partition_name = tbl_def_arg->base_partition();
DBUG_ASSERT(!partition_name.empty());
search_str_part = gen_qualifier_for_table(qualifier, partition_name);
diff --git a/storage/spider/CMakeLists.txt b/storage/spider/CMakeLists.txt
index 14c50f35bd9..dec1cb4c6ba 100644
--- a/storage/spider/CMakeLists.txt
+++ b/storage/spider/CMakeLists.txt
@@ -34,6 +34,8 @@ IF(EXISTS ${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake)
${CMAKE_SOURCE_DIR}/regex)
MYSQL_STORAGE_ENGINE(SPIDER)
+ELSEIF(PLUGIN_PARTITION MATCHES "^NO$")
+ MESSAGE(STATUS "Spider is skipped because partitioning is disabled")
ELSE()
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/spider/hs_client)