Navigation Menu

Skip to content

Commit

Permalink
disable secondary keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetsuro IKEDA committed Jun 11, 2010
1 parent d7515fd commit 91c65f8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ha_mroonga.cc
Expand Up @@ -673,14 +673,21 @@ int ha_mroonga::create(const char *name, TABLE *table, HA_CREATE_INFO *info)
continue; // pkey is already handled
}

// disable secondary key
if (i != pkeynr) {
GRN_LOG(ctx, GRN_LOG_ERROR, "secondary key is not supported (%s)", db_path);
grn_obj_remove(ctx, tbl_obj);
DBUG_RETURN(-1);
}

grn_obj *idx_tbl_obj, *idx_col_obj, *col_obj, *col_type, buf;
KEY key_info = table->s->key_info[i];

// must be single column key
int key_parts = key_info.key_parts;
if (key_parts != 1) {
GRN_LOG(ctx, GRN_LOG_ERROR, "complex key is not supported (%s)", db_path);
return -1;
DBUG_RETURN(-1);
}

mrn_index_name_gen(tbl_name, i, idx_name);
Expand Down

0 comments on commit 91c65f8

Please sign in to comment.