Navigation Menu

Skip to content

Commit

Permalink
use INT8 for SET and ENUM.
Browse files Browse the repository at this point in the history
But should we use INT16 or INT64?
  • Loading branch information
kou committed Dec 19, 2011
1 parent d9f2ab7 commit f48c7e1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ha_mroonga.cc
Expand Up @@ -567,10 +567,14 @@ static grn_builtin_type mrn_grn_type_from_field(grn_ctx *ctx, Field *field,
type = GRN_DB_SHORT_TEXT; // 4Kbytes
break;
case MYSQL_TYPE_ENUM: // ENUM; <= 2bytes
type = GRN_DB_INT16; // 2bytes
type = GRN_DB_INT8; // 1byte
// XXX: Should we use INT16?
// type = GRN_DB_INT16; // 2bytes
break;
case MYSQL_TYPE_SET: // SET; <= 8bytes
type = GRN_DB_INT64; // 8bytes
type = GRN_DB_INT8; // 1byte
// XXX: Should we use INT64?
// type = GRN_DB_INT64; // 8bytes
break;
case MYSQL_TYPE_TINY_BLOB: // TINYBLOB; <= 256bytes
type = GRN_DB_SHORT_TEXT; // 4Kbytes
Expand Down

0 comments on commit f48c7e1

Please sign in to comment.