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 8d24122 commit 49362b4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ha_mroonga.cc
Expand Up @@ -1909,6 +1909,14 @@ int ha_mroonga::wrapper_open_indexes(const char *name)
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 49362b4

Please sign in to comment.