Kouhei Sutou
null+****@clear*****
Mon Nov 19 22:54:03 JST 2012
Kouhei Sutou 2012-11-19 22:54:03 +0900 (Mon, 19 Nov 2012) New Revision: 0e3cad58c701659f7ba0c8a2840b6644de9c7e7b https://github.com/mroonga/mroonga/commit/0e3cad58c701659f7ba0c8a2840b6644de9c7e7b Log: Use mrn_mysql_time_to_grn_time() Modified files: ha_mroonga.cpp Modified: ha_mroonga.cpp (+1 -7) =================================================================== --- ha_mroonga.cpp 2012-11-19 22:23:13 +0900 (e0b8bcf) +++ ha_mroonga.cpp 2012-11-19 22:54:03 +0900 (68332f3) @@ -9497,13 +9497,7 @@ int ha_mroonga::storage_encode_key_time2(Field *field, const uchar *key, my_time_packed_from_binary(key, time2_field->decimals()); MYSQL_TIME mysql_time; TIME_from_longlong_time_packed(&mysql_time, packed_time); - int sec, usec; - sec = mysql_time.hour * 60 * 60 + mysql_time.minute * 60 + mysql_time.second; - if (mysql_time.neg) { - sec = -sec; - } - usec = mysql_time.second_part; - long long int time = GRN_TIME_PACK(sec, usec); + long long int time = mrn_mysql_time_to_grn_time(&mysql_time); memcpy(buf, &time, 8); *size = 8; -------------- next part -------------- HTML����������������������������... Download