<!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">2011-09-23 14:49:29 +0900 (Fri, 23 Sep 2011)</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/464c215dd70001ebf46958cf95f1ed5be5803645">464c215dd70001ebf46958cf95f1ed5be5803645</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, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; padding: 0.5em">[storage] fix read_range_first for no multicolumn index is broken.</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/464c215dd70001ebf46958cf95f1ed5be5803645#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, &quot;Liberation Mono&quot;, 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 (+4 -5)</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"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4053">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4054">4054</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4055">4055</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4056">4056</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/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4057">4057</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/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4058">4058</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4059">4059</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4060">4060</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4311">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4312">4312</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4313">4313</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4314">4314</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/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4315">4315</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4316">4316</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4317">4317</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4327">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4328">4328</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4329">4329</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4330">4330</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/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4331">4331</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/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4332">4332</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/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4333">4333</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/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4334">4334</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4335">4335</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4336">4336</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0L4337">4337</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"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4053">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4054">4054</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4055">4055</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4056">4056</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/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4057">4057</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4058">4058</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4059">4059</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4060">4060</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4311">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4312">4312</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4313">4313</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4314">4314</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/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4315">4315</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/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4316">4316</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/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4317">4317</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4318">4318</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4319">4319</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4320">4320</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4330">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4331">4331</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4332">4332</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4333">4333</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-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4334">4334</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4335">4335</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645#L0R4336">4336</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"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -4054,7 +4054,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">int ha_mroonga::storage_index_first(uchar *buf)</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">   bool is_multiple_column_index = table-&gt;key_info[active_index].key_parts &gt; 1;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   uint pkey_nr = table-&gt;s-&gt;primary_key;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-  if (is_multiple_column_index) { // primary index</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+  if (is_multiple_column_index) { // multiple column index</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     DBUG_PRINT(&quot;info&quot;, (&quot;mroonga use multiple column key&quot;));</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     cur = grn_table_cursor_open(ctx, grn_index_tables[active_index],</span>
<span class="diff-not-changed" style="display: block; white-space: pre">                                 NULL, 0, NULL, 0,</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -4312,6 +4312,9 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">int ha_mroonga::storage_read_range_first(const key_range *start_key,</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">     const char *col_name = field-&gt;field_name;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     int col_name_size = strlen(col_name);</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     if (start_key) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+      mrn_set_key_buf(ctx, field, start_key-&gt;key, key_min[active_index],</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+                      &amp;size_min);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+      val_min = key_min[active_index];</span>
<span class="diff-not-changed" style="display: block; white-space: pre">       if (start_key-&gt;flag == HA_READ_KEY_EXACT) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">         // for _id</span>
<span class="diff-not-changed" style="display: block; white-space: pre">         if (strncmp(MRN_ID_COL_NAME, col_name, col_name_size) == 0) {</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -4328,10 +4331,6 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">int ha_mroonga::storage_read_range_first(const key_range *start_key,</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">             record_id = GRN_ID_NIL;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">             DBUG_RETURN(HA_ERR_END_OF_FILE);</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">-        } else {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-          mrn_set_key_buf(ctx, field, start_key-&gt;key, key_min[active_index],</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-                          &amp;size_min);</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-          val_min = key_min[active_index];</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">     }</span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>