<!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">Tetsuro IKEDA <ikdtt****@gmail*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2009-07-30 15:44:09 +0900 (Thu, 30 Jul 2009)</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/7205864fa84ef6a381cea20553fafd53810c1d1c">7205864fa84ef6a381cea20553fafd53810c1d1c</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">fix a bug of rnx_next, info and some refactering.</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/7205864fa84ef6a381cea20553fafd53810c1d1c#diff-0">ha_groonga.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_groonga.cc (+12 -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, "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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L422">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L423">423</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L424">424</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L425">425</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L426">426</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-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L427">427</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L428">428</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L429">429</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L522">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L523">523</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L524">524</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L525">525</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L526">526</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L527">527</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L528">528</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L529">529</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L680">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L681">681</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L682">682</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L683">683</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L684">684</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L685">685</a></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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L686">686</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L687">687</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L688">688</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L689">689</a></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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L690">690</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L691">691</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0L692">692</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R422">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R423">423</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R424">424</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R425">425</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R426">426</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R427">427</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R428">428</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R429">429</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R430">430</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R431">431</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R432">432</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R433">433</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R434">434</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R435">435</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R436">436</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R529">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R530">530</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R531">531</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R532">532</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R533">533</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R534">534</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R535">535</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R536">536</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R537">537</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R688">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R689">689</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R690">690</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R691">691</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-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R692">692</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R693">693</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R694">694</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R695">695</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/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R696">696</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R697">697</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R698">698</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/7205864fa84ef6a381cea20553fafd53810c1d1c#L0R699">699</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">@@ -423,7 +423,14 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">int ha_groonga::info(uint flag)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> int ha_groonga::info(uint flag)</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_HTRACE;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- stats.records = (ha_rows) mrn_table_size(ctx, this->minfo);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (this->minfo)</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">+ stats.records = (ha_rows) mrn_table_size(ctx, this->minfo);</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">+ else</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">+ stats.records = 2;</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"> return 0;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #endif</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -523,7 +530,8 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">int ha_groonga::rnd_next(uchar *buf)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if (rc == 0)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> Field **field = table->field;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- mrn_column_info **column = cond->list->columns;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ mrn_column_info **column =</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ cond ? cond->list->columns : info->columns;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> grn_obj *value;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> int i;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> for (i=0; *field; field++, column++)</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -681,12 +689,11 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">int ha_groonga::write_row(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"> /* TODO: replace if-else into swtich-case */</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if ((*field)->type() == MYSQL_TYPE_LONG) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- int val = (*field)->val_int();</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- GRN_TEXT_SET(ctx, record->value[i], (char*)&val, sizeof(val));</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ GRN_INT32_SET(ctx, record->value[i], (*field)->val_int());</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> } else if ((*field)->type() == MYSQL_TYPE_VARCHAR) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> String tmp;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> const char *val = (*field)->val_str(&tmp)->ptr();</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- GRN_TEXT_SET(ctx, record->value[i], val, strlen(val));</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ GRN_TEXT_SET(ctx, record->value[i], val, (*field)->data_length());</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> } else {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return HA_ERR_UNSUPPORTED;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>