Navigation Menu

Skip to content

Commit

Permalink
mysql8 wrapper: resolve TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Aug 10, 2018
1 parent afe9cde commit 5d62460
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions ha_mroonga.cpp
Expand Up @@ -14089,13 +14089,9 @@ ha_rows ha_mroonga::estimate_rows_upper_bound()
#ifdef MRN_HANDLER_HAVE_GET_DEFAULT_INDEX_ALGORITHM
enum ha_key_alg ha_mroonga::wrapper_get_default_index_algorithm() const
{
enum ha_key_alg algorithm;
MRN_DBUG_ENTER_METHOD();
MRN_SET_WRAP_SHARE_KEY(share, table->s);
MRN_SET_WRAP_TABLE_KEY(this, table);
algorithm = wrap_handler->get_default_index_algorithm();
MRN_SET_BASE_SHARE_KEY(share, table->s);
MRN_SET_BASE_TABLE_KEY(this, table);
enum ha_key_alg algorithm =
wrap_handler_for_create->get_default_index_algorithm();
DBUG_RETURN(algorithm);
}

Expand All @@ -14110,8 +14106,7 @@ enum ha_key_alg ha_mroonga::get_default_index_algorithm() const
{
MRN_DBUG_ENTER_METHOD();
enum ha_key_alg algorithm;
// TODO: share isn't initialized yet.
if (share && share->wrapper_mode) {
if (wrap_handler_for_create) {
algorithm = wrapper_get_default_index_algorithm();
} else {
algorithm = storage_get_default_index_algorithm();
Expand All @@ -14123,13 +14118,8 @@ enum ha_key_alg ha_mroonga::get_default_index_algorithm() const
#ifdef MRN_HANDLER_HAVE_IS_INDEX_ALGORITHM_SUPPORTED
bool ha_mroonga::wrapper_is_index_algorithm_supported(enum ha_key_alg algorithm) const
{
bool supported;
MRN_DBUG_ENTER_METHOD();
MRN_SET_WRAP_SHARE_KEY(share, table->s);
MRN_SET_WRAP_TABLE_KEY(this, table);
supported = wrap_handler->is_index_algorithm_supported(algorithm);
MRN_SET_BASE_SHARE_KEY(share, table->s);
MRN_SET_BASE_TABLE_KEY(this, table);
bool supported = wrap_handler_for_create->is_index_algorithm_supported(algorithm);
DBUG_RETURN(supported);
}

Expand All @@ -14144,8 +14134,7 @@ bool ha_mroonga::is_index_algorithm_supported(enum ha_key_alg algorithm) const
{
MRN_DBUG_ENTER_METHOD();
bool supported;
// TODO: share isn't initialized yet.
if (share && share->wrapper_mode) {
if (wrap_handler_for_create) {
supported = wrapper_is_index_algorithm_supported(algorithm);
} else {
supported = storage_is_index_algorithm_supported(algorithm);
Expand Down

0 comments on commit 5d62460

Please sign in to comment.