Navigation Menu

Skip to content

Commit

Permalink
[storage] return error code for unsupported key type.
Browse files Browse the repository at this point in the history
TODO: callers should check it.
  • Loading branch information
kou committed Sep 24, 2011
1 parent a544158 commit e0750d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ha_mroonga.cc
Expand Up @@ -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) {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e0750d6

Please sign in to comment.