Commit e119799a authored by Sergei Golubchik's avatar Sergei Golubchik

fix compilation wih -DPLUGIN_PARTITION=NO

rocksdb and spider
parent 2daa0058
......@@ -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 "";
......
......@@ -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);
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment