Navigation Menu

Skip to content

Commit

Permalink
Use suitable return value name for get_error_message()
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 19, 2012
1 parent 2526129 commit 22cdf90
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ha_mroonga.cpp
Expand Up @@ -6926,36 +6926,36 @@ void ha_mroonga::cond_pop()

bool ha_mroonga::wrapper_get_error_message(int error, String *buf)
{
bool res;
bool temporay_error;
MRN_DBUG_ENTER_METHOD();
MRN_SET_WRAP_SHARE_KEY(share, table->s);
MRN_SET_WRAP_TABLE_KEY(this, table);
res = wrap_handler->get_error_message(error, buf);
temporay_error = wrap_handler->get_error_message(error, buf);
MRN_SET_BASE_SHARE_KEY(share, table->s);
MRN_SET_BASE_TABLE_KEY(this, table);
DBUG_RETURN(res);
DBUG_RETURN(temporay_error);
}

bool ha_mroonga::storage_get_error_message(int error, String *buf)
{
MRN_DBUG_ENTER_METHOD();
bool temporay_error = false;
// latest error message
buf->copy(ctx->errbuf, (uint) strlen(ctx->errbuf), system_charset_info);
DBUG_RETURN(false);
DBUG_RETURN(temporay_error);
}

bool ha_mroonga::get_error_message(int error, String *buf)
{
MRN_DBUG_ENTER_METHOD();
// XXX: success is valid variable name?
bool success;
bool temporay_error;
if (share && share->wrapper_mode)
{
success = wrapper_get_error_message(error, buf);
temporay_error = wrapper_get_error_message(error, buf);
} else {
success = storage_get_error_message(error, buf);
temporay_error = storage_get_error_message(error, buf);
}
DBUG_RETURN(success);
DBUG_RETURN(temporay_error);
}

void ha_mroonga::push_warning_unsupported_spatial_index_search(enum ha_rkey_function flag)
Expand Down

2 comments on commit 22cdf90

@ryoqun
Copy link

@ryoqun ryoqun commented on 22cdf90 Apr 20, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think temporay is a typo for the temporary.

@kou
Copy link
Member Author

@kou kou commented on 22cdf90 Apr 20, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so too!
I've fixed them in master.

Thanks!

Please sign in to comment.