Skip to content

Commit

Permalink
MariaRocks port: temporarily disable rdb_collation_exceptions
Browse files Browse the repository at this point in the history
Then Regex_list_handler is not needed and we don't have to backport
it right now.
  • Loading branch information
spetrunia committed Oct 16, 2016
1 parent 7eef3de commit 27adea9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion storage/rocksdb/ha_rocksdb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,11 @@ Rdb_binlog_manager binlog_manager;

static Rdb_background_thread rdb_bg_thread;


#ifdef MARIAROCKS_NOT_YET
// List of table names (using regex) that are exceptions to the strict
// collation check requirement.
Regex_list_handler *rdb_collation_exceptions;
#endif

static const char* const ERRSTR_ROLLBACK_ONLY
= "This transaction was rolled back and cannot be "
Expand Down Expand Up @@ -3288,11 +3289,13 @@ static int rocksdb_init_func(void *p)
mysql_mutex_init(rdb_mem_cmp_space_mutex_key, &rdb_mem_cmp_space_mutex,
MY_MUTEX_INIT_FAST);

#ifdef MARIAROCKS_NOT_YET
#if defined(HAVE_PSI_INTERFACE)
rdb_collation_exceptions = new Regex_list_handler(
key_rwlock_collation_exception_list);
#else
rdb_collation_exceptions = new Regex_list_handler();
#endif
#endif

mysql_mutex_init(rdb_sysvars_psi_mutex_key, &rdb_sysvars_mutex,
Expand Down Expand Up @@ -3672,7 +3675,9 @@ static int rocksdb_done_func(void *p)
mysql_mutex_destroy(&rdb_open_tables.m_mutex);
mysql_mutex_destroy(&rdb_sysvars_mutex);

#ifdef MARIAROCKS_NOT_YET
delete rdb_collation_exceptions;
#endif
mysql_mutex_destroy(&rdb_collation_data_mutex);
mysql_mutex_destroy(&rdb_mem_cmp_space_mutex);

Expand Down Expand Up @@ -4751,6 +4756,7 @@ void ha_rocksdb::set_skip_unique_check_tables(const char* whitelist)
{
DBUG_ASSERT(whitelist != nullptr);

#ifdef MARIAROCKS_NOT_YET // regex_handler
#if defined(HAVE_PSI_INTERFACE)
Regex_list_handler regex_handler(key_rwlock_skip_unique_check_tables);
#else
Expand All @@ -4763,6 +4769,7 @@ void ha_rocksdb::set_skip_unique_check_tables(const char* whitelist)
}

m_skip_unique_check= regex_handler.matches(m_tbl_def->base_tablename());
#endif
}

int ha_rocksdb::open(const char *name, int mode, uint test_if_locked)
Expand Down Expand Up @@ -5055,7 +5062,11 @@ int ha_rocksdb::create_cfs(const TABLE *table_arg, Rdb_tbl_def *tbl_def_arg,
{
if (!rdb_is_index_collation_supported(
table_arg->key_info[i].key_part[part].field) &&
#ifdef MARIAROCKS_NOT_YET
!rdb_collation_exceptions->matches(tablename_sys))
#else
true)
#endif
{
std::string collation_err;
for (auto coll : RDB_INDEX_COLLATIONS)
Expand Down Expand Up @@ -10602,13 +10613,15 @@ rocksdb_set_rate_limiter_bytes_per_sec(

void rdb_set_collation_exception_list(const char *exception_list)
{
#ifdef MARIAROCKS_NOT_YET
DBUG_ASSERT(rdb_collation_exceptions != nullptr);

if (!rdb_collation_exceptions->set_patterns(exception_list))
{
my_core::warn_about_bad_patterns(rdb_collation_exceptions,
"strict_collation_exceptions");
}
#endif
}

void
Expand Down

0 comments on commit 27adea9

Please sign in to comment.