<!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 <kou****@clear*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2012-05-28 23:43:39 +0900 (Mon, 28 May 2012)</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/9817d84cb40f765b07b7f3b406567fe390260933">9817d84cb40f765b07b7f3b406567fe390260933</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">Define a meaningful variable</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/9817d84cb40f765b07b7f3b406567fe390260933#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, "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_mroonga.cpp (+3 -3)</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/9817d84cb40f765b07b7f3b406567fe390260933#L0L2690">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0L2691">2691</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0L2692">2692</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0L2693">2693</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/9817d84cb40f765b07b7f3b406567fe390260933#L0L2694">2694</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/9817d84cb40f765b07b7f3b406567fe390260933#L0L2695">2695</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0L2696">2696</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0L2697">2697</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/9817d84cb40f765b07b7f3b406567fe390260933#L0L2698">2698</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/9817d84cb40f765b07b7f3b406567fe390260933#L0L2699">2699</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0L2700">2700</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0L2701">2701</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0L2772">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0L2773">2773</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0L2774">2774</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0L2775">2775</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/9817d84cb40f765b07b7f3b406567fe390260933#L0L2776">2776</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/9817d84cb40f765b07b7f3b406567fe390260933#L0L2777">2777</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0L2778">2778</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0L2779">2779</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/9817d84cb40f765b07b7f3b406567fe390260933#L0R2690">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0R2691">2691</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0R2692">2692</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0R2693">2693</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/9817d84cb40f765b07b7f3b406567fe390260933#L0R2694">2694</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0R2695">2695</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0R2696">2696</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0R2697">2697</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/9817d84cb40f765b07b7f3b406567fe390260933#L0R2698">2698</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0R2699">2699</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0R2700">2700</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0R2701">2701</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0R2772">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0R2773">2773</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0R2774">2774</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0R2775">2775</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/9817d84cb40f765b07b7f3b406567fe390260933#L0R2776">2776</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0R2777">2777</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0R2778">2778</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933#L0R2779">2779</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">@@ -2691,11 +2691,11 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">int ha_mroonga::storage_create_index(TABLE *table, const char *grn_table_name,</span></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"> mrn::IndexTableName index_table_name(grn_table_name, key_info->name);</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- int key_parts = key_info->key_parts;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ bool is_multiple_column_index = key_info->key_parts > 1;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> grn_obj_flags index_table_flags = GRN_OBJ_PERSISTENT;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> grn_obj_flags index_column_flags =</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> GRN_OBJ_COLUMN_INDEX | GRN_OBJ_WITH_POSITION | GRN_OBJ_PERSISTENT;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- if (key_parts == 1) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (!is_multiple_column_index) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> Field *field = key_info->key_part[0].field;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> const char *column_name = field->field_name;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> int column_name_size = strlen(column_name);</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -2773,7 +2773,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">int ha_mroonga::storage_create_index(TABLE *table, const char *grn_table_name,</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"> mrn_change_encoding(ctx, system_charset_info);</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- if (key_parts == 1) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (!is_multiple_column_index) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if (column) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> grn_obj source_ids;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> grn_id source_id = grn_obj_id(ctx, column);</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>