Navigation Menu

Skip to content

Commit

Permalink
clean up for alter table error. refs #1195
Browse files Browse the repository at this point in the history
  • Loading branch information
Kentoku committed Feb 22, 2012
1 parent 30afd4c commit 442227c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions ha_mroonga.cc
Expand Up @@ -9795,12 +9795,6 @@ int ha_mroonga::rename_table(const char *from, const char *to)
DBUG_RETURN(error);
}

if (to_table_name[0] == '#')
{
if ((error = alter_share_add(to, tmp_table_share)))
DBUG_RETURN(error);
}

if (tmp_share->wrapper_mode)
{
error = wrapper_rename_table(from, to, tmp_share,
Expand All @@ -9811,8 +9805,12 @@ int ha_mroonga::rename_table(const char *from, const char *to)
}

mrn_free_share(tmp_share);
if (to_table_name[0] != '#')
{
if (!error && to_table_name[0] == '#') {
if ((error = alter_share_add(to, tmp_table_share)))
DBUG_RETURN(error);
} else if (error && from_table_name[0] == '#') {
alter_share_add(from, tmp_table_share);
} else {
mrn_open_mutex_lock();
mrn_free_tmp_table_share(tmp_table_share);
mrn_open_mutex_unlock();
Expand Down

0 comments on commit 442227c

Please sign in to comment.