Kouhei Sutou
null+****@clear*****
Thu Oct 4 10:33:27 JST 2012
Kouhei Sutou 2011-12-21 12:54:51 +0900 (Wed, 21 Dec 2011) New Revision: 9c405c164ee811661676d1c3cd941fdd05e6d9b4 https://github.com/mroonga/mroonga/commit/9c405c164ee811661676d1c3cd941fdd05e6d9b4 Log: [mysql5.6.4] support MYSQL_TYPE_{TIMESTAMP,DATETIME,TIME}2. Modified files: ha_mroonga.cc ha_mroonga.h Modified: ha_mroonga.cc (+15 -0) =================================================================== --- ha_mroonga.cc 2011-12-21 12:49:50 +0900 (0c0e129) +++ ha_mroonga.cc 2011-12-21 12:54:51 +0900 (9494885) @@ -563,6 +563,21 @@ static grn_builtin_type mrn_grn_type_from_field(grn_ctx *ctx, Field *field, case MYSQL_TYPE_BIT: // BIT; <= 8bytes type = GRN_DB_INT64; // 8bytes break; +#ifdef MRN_HAVE_MYSQL_TYPE_TIMESTAMP2 + case MYSQL_TYPE_TIMESTAMP2: // TIMESTAMP; 4bytes + type = GRN_DB_TIME; // 8bytes + break; +#endif +#ifdef MRN_HAVE_MYSQL_TYPE_DATETIME2 + case MYSQL_TYPE_DATETIME2: // DATETIME; 8bytes + type = GRN_DB_TIME; // 8bytes + break; +#endif +#ifdef MRN_HAVE_MYSQL_TYPE_TIME2 + case MYSQL_TYPE_TIME2: // TIME; 3bytes + type = GRN_DB_TIME; // 8bytes + break; +#endif case MYSQL_TYPE_NEWDECIMAL: // DECIMAL; <= 9bytes type = GRN_DB_SHORT_TEXT; // 4Kbytes break; Modified: ha_mroonga.h (+6 -0) =================================================================== --- ha_mroonga.h 2011-12-21 12:49:50 +0900 (35aa823) +++ ha_mroonga.h 2011-12-21 12:54:51 +0900 (2d3b8fd) @@ -85,6 +85,12 @@ extern "C" { # define MRN_HA_ROWS_FORMAT "lu" #endif +#if MYSQL_VERSION_ID >= 50604 +# define MRN_HAVE_MYSQL_TYPE_TIMESTAMP2 +# define MRN_HAVE_MYSQL_TYPE_DATETIME2 +# define MRN_HAVE_MYSQL_TYPE_TIME2 +#endif + class ha_mroonga; /* structs */ -------------- next part -------------- HTML����������������������������...Download