null+****@clear*****
null+****@clear*****
2011年 12月 19日 (月) 17:03:47 JST
Kouhei Sutou 2011-12-19 08:03:47 +0000 (Mon, 19 Dec 2011)
New Revision: f48c7e1dc8b77558353c30ae185ab8b3a3af9468
Log:
use INT8 for SET and ENUM.
But should we use INT16 or INT64?
Modified files:
ha_mroonga.cc
Modified: ha_mroonga.cc (+6 -2)
===================================================================
--- ha_mroonga.cc 2011-12-19 07:57:59 +0000 (bd6ec57)
+++ ha_mroonga.cc 2011-12-19 08:03:47 +0000 (a8fe5f8)
@@ -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