[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] use INT8 for SET and ENUM.

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 4 10:33:28 JST 2012


Kouhei Sutou	2011-12-19 17:03:47 +0900 (Mon, 19 Dec 2011)

  New Revision: f48c7e1dc8b77558353c30ae185ab8b3a3af9468
  https://github.com/mroonga/mroonga/commit/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 16:57:59 +0900 (bd6ec57)
+++ ha_mroonga.cc    2011-12-19 17:03:47 +0900 (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
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-mysql-commit mailing list
Back to archive index