[Groonga-mysql-commit] mroonga/mroonga at 4a1808e [master] mariadb10: don't use gmt_sec_to_TIME() with "struct timeval"

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Oct 8 14:37:53 JST 2013


Kouhei Sutou	2013-10-08 14:37:53 +0900 (Tue, 08 Oct 2013)

  New Revision: 4a1808e2b28d9a63b03cd8f60627c1cbd5a5048b
  https://github.com/mroonga/mroonga/commit/4a1808e2b28d9a63b03cd8f60627c1cbd5a5048b

  Message:
    mariadb10: don't use gmt_sec_to_TIME() with "struct timeval"
    
    It exists in MySQL 5.6 but doesn't in MariaDB 10.0.4.

  Modified files:
    ha_mroonga.cpp

  Modified: ha_mroonga.cpp (+2 -1)
===================================================================
--- ha_mroonga.cpp    2013-10-08 14:27:06 +0900 (db04b6e)
+++ ha_mroonga.cpp    2013-10-08 14:37:53 +0900 (0e90ed5)
@@ -10226,7 +10226,8 @@ int ha_mroonga::storage_encode_key_timestamp2(Field *field, const uchar *key,
   struct timeval tm;
   my_timestamp_from_binary(&tm, key, timestamp2_field->decimals());
   MYSQL_TIME mysql_time;
-  mrn_my_tz_UTC->gmt_sec_to_TIME(&mysql_time, tm);
+  mrn_my_tz_UTC->gmt_sec_to_TIME(&mysql_time, (my_time_t)tm.tv_sec);
+  mysql_time.second_part = tm.tv_usec;
   long long int grn_time = mrn_mysql_time_to_grn_time(&mysql_time, &truncated);
   if (truncated) {
     field->set_warning(Sql_condition::WARN_LEVEL_WARN,
-------------- next part --------------
HTML����������������������������...
다운로드 



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