Navigation Menu

Skip to content

Commit

Permalink
[wrapper] cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Oct 3, 2011
1 parent 41bfa83 commit 7d2277f
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions ha_mroonga.cc
Expand Up @@ -1557,13 +1557,13 @@ int ha_mroonga::wrapper_create_index(const char *name, TABLE *table,
uint n_keys = table->s->keys;
grn_obj *index_tables[n_keys];
for (i = 0; i < n_keys; i++) {
KEY key_info = table->s->key_info[i];
index_tables[i] = NULL;

KEY key_info = table->s->key_info[i];
if (key_info.algorithm != HA_KEY_ALG_FULLTEXT) {
continue;
}

index_tables[i] = NULL;
error = wrapper_validate_key_info(&key_info);
if (error)
{
Expand All @@ -1580,15 +1580,7 @@ int ha_mroonga::wrapper_create_index(const char *name, TABLE *table,

if (error)
{
int j;
for (j = 0; j < i; j++) {
KEY key_info = table->s->key_info[j];

if (key_info.algorithm != HA_KEY_ALG_FULLTEXT)
{
continue;
}

for (int j = 0; j < i; j++) {
if (index_tables[j])
{
grn_obj_remove(ctx, index_tables[j]);
Expand Down

0 comments on commit 7d2277f

Please sign in to comment.