Navigation Menu

Skip to content

Commit

Permalink
[storage] keep backward compatibility for index column name change.
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Sep 23, 2011
1 parent a38fc67 commit b698bf7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ha_mroonga.cc
Expand Up @@ -2224,11 +2224,18 @@ int ha_mroonga::storage_open_indexes(const char *name)
goto error;
}

Field *field = key_info.key_part[0].field;
grn_index_columns[i] = grn_obj_column(ctx,
grn_index_tables[i],
index_column_name,
strlen(index_column_name));
if (!grn_index_columns[i]) {
/* just for backward compatibility before 1.0. */
Field *field = key_info.key_part[0].field;
grn_index_columns[i] = grn_obj_column(ctx, grn_index_tables[i],
field->field_name,
strlen(field->field_name));
}

if (ctx->rc) {
error = ER_CANT_OPEN_FILE;
my_message(error, ctx->errbuf, MYF(0));
Expand Down

0 comments on commit b698bf7

Please sign in to comment.