<!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">Kentaro Hayashi &lt;hayas****@clear*****&gt;</dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
      <dd style="margin-left: 8.5em">2017-06-02 13:09:26 +0900 (Fri, 02 Jun 2017)</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/13858df104f766369e5c7d3b1903d54ee4c7c632">13858df104f766369e5c7d3b1903d54ee4c7c632</a></dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Merge</dt>
      <dd style="margin-left: 8.5em">
        <ul>
          <li>Merged <a href="https://github.com/mroonga/mroonga/commit/a24ae13">a24ae13</a>: Merge pull request <a href="https://github.com/mroonga/mroonga/issues/143">#143</a> from kenhys/check-invalid-argument</li>
        </ul>
      </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">show error message when creating a table for matched records

When indexes are broken, there is a case that the value of
 matched_record_keys is null.
This commit shows error message for such a case.</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/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2">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 (+8 -0)</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/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2L8704">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2L8705">8705</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2L8706">8706</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2L8707">8707</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-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2L8708">8708</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2L8709">8709</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2L8710">8710</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/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2R8704">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2R8705">8705</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2R8706">8706</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2R8707">8707</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2R8708">8708</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2R8709">8709</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2R8710">8710</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2R8711">8711</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2R8712">8712</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2R8713">8713</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2R8714">8714</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2R8715">8715</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2R8716">8716</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2R8717">8717</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/13858df104f766369e5c7d3b1903d54ee4c7c632#diff-ba714ec217aa6836e39b3aea9da57ae2R8718">8718</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">@@ -8705,6 +8705,14 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">FT_INFO *ha_mroonga::generic_ft_init_ext(uint flags, uint key_nr, String *key)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">     matched_record_keys = grn_table_create(ctx, NULL, 0, NULL,</span>
<span class="diff-not-changed" style="display: block; white-space: pre">                                            GRN_OBJ_TABLE_HASH_KEY | GRN_OBJ_WITH_SUBREC,</span>
<span class="diff-not-changed" style="display: block; white-space: pre">                                            grn_table, 0);</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+    if (!matched_record_keys) {</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+      char error_message[MRN_MESSAGE_BUFFER_SIZE];</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+      snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE,</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+               &quot;failed to create a table for matched record: &lt;%s&gt;&quot;,</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+               ctx-&gt;errbuf);</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+      my_message(ER_ERROR_ON_READ, error_message, MYF(0));</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+      GRN_LOG(ctx, GRN_LOG_ERROR, &quot;%s&quot;, error_message);</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; 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"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre">   grn_table_sort_key *sort_keys = NULL;</span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>