Navigation Menu

Skip to content

Commit

Permalink
reduce duplicated codes.
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Feb 15, 2012
1 parent d81c526 commit 00b2fca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ha_mroonga.cc
Expand Up @@ -3569,7 +3569,7 @@ int ha_mroonga::delete_table(const char *name)
mrn_open_mutex_lock();
mrn_free_tmp_table_share(tmp_table_share);
mrn_open_mutex_unlock();
if (name[0] != '.') {
if (is_temporary_table_name(name)) {
/* temporary table */
mrn_drop_db(mrn_hton_ptr, (char *) name);
}
Expand Down Expand Up @@ -6957,6 +6957,14 @@ bool ha_mroonga::is_need_normalize(Field *field) const
DBUG_RETURN(need_normalize_p);
}

bool ha_mroonga::is_temporary_table_name(const char *name) const
{
MRN_DBUG_ENTER_METHOD();
DBUG_PRINT("info", ("mroonga: table name = %s", name));
bool temporary_table_name_p = (name[0] != '.');
DBUG_RETURN(temporary_table_name_p);
}

void ha_mroonga::check_count_skip(key_part_map start_key_part_map,
key_part_map end_key_part_map, bool fulltext)
{
Expand Down
1 change: 1 addition & 0 deletions ha_mroonga.h
Expand Up @@ -418,6 +418,7 @@ class ha_mroonga: public handler
bool is_dry_write();
bool is_enable_optimization();
bool is_need_normalize(Field *field) const;
bool is_temporary_table_name(const char *name) const;
void check_count_skip(key_part_map start_key_part_map,
key_part_map end_key_part_map, bool fulltext);
bool is_groonga_layer_condition(const Item *item,
Expand Down

0 comments on commit 00b2fca

Please sign in to comment.