<!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 &lt;kou****@clear*****&gt;</dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
      <dd style="margin-left: 8.5em">2014-02-04 12:21:53 +0900 (Tue, 04 Feb 2014)</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a">614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a</a></dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Message</dt>
      <dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">storage: ignore NULL geometry value on write</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#diff-0">ha_mroonga.cpp</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, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">  Modified: ha_mroonga.cpp (+16 -2)</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, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0L5246">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0L5247">5247</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0L5248">5248</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0L5249">5249</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0L5250">5250</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0L5251">5251</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0L5252">5252</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0L5253">5253</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0L5257">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0L5258">5258</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0L5259">5259</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0L5260">5260</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0L5261">5261</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0L5262">5262</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0L5263">5263</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0L5264">5264</a></span>
</pre>
            </th>
            <th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5246">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5247">5247</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5248">5248</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5249">5249</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5250">5250</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5251">5251</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5252">5252</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5253">5253</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5254">5254</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5255">5255</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5256">5256</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5257">5257</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5258">5258</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5259">5259</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5260">5260</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5261">5261</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5262">5262</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5263">5263</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5267">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5268">5268</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5269">5269</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5270">5270</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5271">5271</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5272">5272</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5273">5273</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5274">5274</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/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5275">5275</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5276">5276</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5277">5277</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/614c2be4d1e8e79de49e9cf94ba7382aa7ac3e1a#L0R5278">5278</a></span>
</pre>
            </th>
            <td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -5247,7 +5247,17 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">int ha_mroonga::storage_write_row(uchar *buf)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">     Field *field = table-&gt;field[i];</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     const char *column_name = field-&gt;field_name;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-    if (field-&gt;is_null()) continue;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    if (field-&gt;is_null())</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+      continue;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+#ifdef HAVE_SPATIAL</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    bool is_null_geometry_value =</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+      field-&gt;real_type() == MYSQL_TYPE_GEOMETRY &amp;&amp;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+      static_cast&lt;Field_geom *&gt;(field)-&gt;get_length() == 0;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    if (is_null_geometry_value) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+      continue;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    }</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"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre">     if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">       continue;</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -5258,7 +5268,11 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">int ha_mroonga::storage_write_row(uchar *buf)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">       grn_obj_unlink(ctx, &amp;colbuf);</span>
<span class="diff-not-changed" style="display: block; white-space: pre">       goto err2;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     }</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-    generic_store_bulk(field, &amp;colbuf);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    error = generic_store_bulk(field, &amp;colbuf);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    if (error) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+      grn_obj_unlink(ctx, &amp;colbuf);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+      goto err2;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    }</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     if (added &amp;&amp; is_grn_zero_column_value(grn_columns[i], &amp;colbuf)) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">       // WORKAROUND: groonga can't index newly added '0' value for</span>
<span class="diff-not-changed" style="display: block; white-space: pre">       // fix size column. So we add non-'0' value first then add</span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>