Navigation Menu

Skip to content

Commit

Permalink
add limitation for using index other than primary key.
Browse files Browse the repository at this point in the history
  • Loading branch information
ikdttr committed Mar 18, 2009
1 parent c24a588 commit 5fe55e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ha_groonga.cc
Expand Up @@ -154,6 +154,10 @@ int ha_groonga::create(const char *name, TABLE *form, HA_CREATE_INFO *info)
value_size = GRN_TABLE_MAX_KEY_SIZE;
key_type = grn_ctx_get(mrn_ctx_tls, GRN_DB_INT);
} else {
if (form->s->keys > 0) {
MRN_LOG(GRN_LOG_ERROR, "cannot create index other than primary key");
return HA_WRONG_CREATE_OPTION;
}
table_flags |= GRN_OBJ_TABLE_NO_KEY;
value_size = 0;
key_type = NULL;
Expand Down

0 comments on commit 5fe55e9

Please sign in to comment.