null+****@clear*****
null+****@clear*****
2011年 9月 24日 (土) 18:43:36 JST
Kouhei Sutou 2011-09-24 09:43:36 +0000 (Sat, 24 Sep 2011)
New Revision: 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 09:34:09 +0000 (e0a1f86)
+++ ha_mroonga.cc 2011-09-24 09:43:36 +0000 (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)