Tetsuro IKEDA
null+****@clear*****
Thu Oct 4 10:18:31 JST 2012
Tetsuro IKEDA 2009-03-18 16:39:03 +0900 (Wed, 18 Mar 2009) New Revision: 5fe55e924bcc378bedf8f369248e2f4d9f0da94d https://github.com/mroonga/mroonga/commit/5fe55e924bcc378bedf8f369248e2f4d9f0da94d Log: add limitation for using index other than primary key. Modified files: src/ha_groonga.cc Modified: src/ha_groonga.cc (+4 -0) =================================================================== --- src/ha_groonga.cc 2009-03-18 15:50:08 +0900 (1f88ebd) +++ src/ha_groonga.cc 2009-03-18 16:39:03 +0900 (de17150) @@ -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; -------------- next part -------------- HTML����������������������������...Download