Kouhei Sutou
null+****@clear*****
Thu Oct 4 10:28:31 JST 2012
Kouhei Sutou 2011-09-24 18:43:36 +0900 (Sat, 24 Sep 2011) New Revision: e0750d696826ee7cb2da065c3a080f3b90dfa48a https://github.com/mroonga/mroonga/commit/e0750d696826ee7cb2da065c3a080f3b90dfa48a Log: [storage] return error code for unsupported key type. TODO: callers should check it. Modified files: ha_mroonga.cc Modified: ha_mroonga.cc (+4 -2) =================================================================== --- ha_mroonga.cc 2011-09-24 18:34:09 +0900 (e0a1f86) +++ ha_mroonga.cc 2011-09-24 18:43:36 +0900 (043f671) @@ -699,6 +699,7 @@ static uchar *mrn_multiple_column_key_encode(KEY *key_info, static int mrn_set_key_buf(grn_ctx *ctx, Field *field, const uchar *key, uchar *buf, uint *size) { + int error = 0; char *ptr = (char*) key; if (field->null_bit != 0x0) { @@ -778,9 +779,10 @@ static int mrn_set_key_buf(grn_ctx *ctx, Field *field, break; } default: - return -1; + error = HA_ERR_UNSUPPORTED; + break; } - return 0; + return error; } static void mrn_store_field(grn_ctx *ctx, Field *field, grn_obj *col, grn_id id) -------------- next part -------------- HTML����������������������������...다운로드