<!DOCTYPE html>
<html>
<head>
</head>
<body>
<dl style="line-height: 1.5; margin-left: 2em">
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
<dd style="margin-left: 8.5em">Kouhei Sutou <kou****@clear*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2012-02-05 15:21:59 +0900 (Sun, 05 Feb 2012)</dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
<dd style="margin-left: 8.5em"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74">2f133061d2cc7589f6ebe6c74753ecf42f6bbb74</a></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Log</dt>
<dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em">[mariadb] support fractiona seconds but it may be costful.</pre></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
<dd style="margin-left: 8.5em">
<ul>
<li><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#diff-0">ha_mroonga.cc</a></li>
</ul>
</dd>
</dl>
<div class="diff-section" style="clear: both">
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: ha_mroonga.cc (+19 -1)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0L7875">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0L7876">7876</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0L7877">7877</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0L7878">7878</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0L7879">7879</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0L7880">7880</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0L7881">7881</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0L7882">7882</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0L7883">7883</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0L7884">7884</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0L7885">7885</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0L7886">7886</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0L7887">7887</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0L7888">7888</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7875">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7876">7876</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7877">7877</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7878">7878</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7879">7879</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7880">7880</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7881">7881</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7882">7882</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7883">7883</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7884">7884</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7885">7885</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7886">7886</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7887">7887</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7888">7888</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7889">7889</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7890">7890</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7891">7891</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7892">7892</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7893">7893</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7894">7894</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7895">7895</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7896">7896</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7897">7897</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7898">7898</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7899">7899</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7900">7900</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7901">7901</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7902">7902</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7903">7903</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7904">7904</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7905">7905</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/2f133061d2cc7589f6ebe6c74753ecf42f6bbb74#L0R7906">7906</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -7876,13 +7876,31 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">int ha_mroonga::storage_encode_key_time(Field *field, const uchar *key,</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> MRN_DBUG_ENTER_METHOD();</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> int error = 0;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ long long int time;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+#ifdef MRN_MARIADB_P</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ // TODO: remove me when MariaDB becomes based on MySQL 5.6.</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ // This implementation may be costful.</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ Field_time_hires *time_hires_field = (Field_time_hires *)field;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ Field_time_hires unpacker((uchar *)key,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ (uchar *)(key - 1),</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ time_hires_field->null_bit,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ time_hires_field->unireg_check,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ time_hires_field->field_name,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ time_hires_field->decimals(),</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ time_hires_field->charset());</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ MYSQL_TIME mysql_time;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ uint fuzzy_date = 0;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ unpacker.get_date(&mysql_time, fuzzy_date);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ time = mrn_mysql_time_to_grn_time(&mysql_time);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+#else</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> int mysql_time = (int)sint3korr(key);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> int sec =</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> mysql_time / 10000 * 60 * 60 +</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> mysql_time / 100 % 100 * 60 +</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> mysql_time % 60;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> int usec = 0;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- long long int time = GRN_TIME_PACK(sec, usec);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ time = GRN_TIME_PACK(sec, usec);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+#endif</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> memcpy(buf, &time, 8);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> *size = 8;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> DBUG_RETURN(error);</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>