<!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-08-22 22:24:36 +0900 (Fri, 22 Aug 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/b899b2a66a40541abc17b590b91d30f96a8b892b">b899b2a66a40541abc17b590b91d30f96a8b892b</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">Fix wrong return value

We should not use grn_rc for error code in MySQL. grn_rc should be
converted to MySQL error code.</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/b899b2a66a40541abc17b590b91d30f96a8b892b#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 (+6 -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/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4407">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4408">4408</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4409">4409</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4410">4410</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-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4411">4411</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4412">4412</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4413">4413</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4414">4414</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4415">4415</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/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4416">4416</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4417">4417</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4418">4418</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4419">4419</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4440">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4441">4441</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4442">4442</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4443">4443</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-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4444">4444</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4445">4445</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4446">4446</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4447">4447</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4448">4448</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/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4449">4449</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4450">4450</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4451">4451</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0L4452">4452</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/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4407">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4408">4408</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4409">4409</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4410">4410</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/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4411">4411</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/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4412">4412</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/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4413">4413</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4414">4414</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4415">4415</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4416">4416</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4417">4417</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4418">4418</a></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/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4419">4419</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4420">4420</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4421">4421</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4442">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4443">4443</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4444">4444</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4445">4445</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/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4446">4446</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/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4447">4447</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/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4448">4448</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4449">4449</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4450">4450</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4451">4451</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4452">4452</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4453">4453</a></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/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4454">4454</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4455">4455</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/b899b2a66a40541abc17b590b91d30f96a8b892b#L0R4456">4456</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">@@ -4408,12 +4408,14 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">int ha_mroonga::wrapper_delete_index(const char *name, MRN_SHARE *tmp_share,</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"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre">   grn_obj *table = grn_ctx_get(ctx, table_name, strlen(table_name));</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+  if (!ctx-&gt;rc) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    grn_obj_remove(ctx, table);</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 (ctx-&gt;rc) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     error = ER_CANT_OPEN_FILE;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     my_message(error, ctx-&gt;errbuf, MYF(0));</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     DBUG_RETURN(error);</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">-  error = grn_obj_remove(ctx, table);</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   DBUG_RETURN(error);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -4441,12 +4443,14 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">int ha_mroonga::storage_delete_table(const char *name, MRN_SHARE *tmp_share,</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"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre">   grn_obj *table_obj = grn_ctx_get(ctx, table_name, strlen(table_name));</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+  if (!ctx-&gt;rc) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    grn_obj_remove(ctx, table_obj);</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 (ctx-&gt;rc) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     error = ER_CANT_OPEN_FILE;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     my_message(error, ctx-&gt;errbuf, MYF(0));</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     DBUG_RETURN(error);</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">-  error = grn_obj_remove(ctx, table_obj);</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   DBUG_RETURN(error);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>