<!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">Kentoku <kento****@gmail*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2013-07-16 03:00:25 +0900 (Tue, 16 Jul 2013)</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e">ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e</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, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">add count skip optimization for wrapper mode. refs #1841</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#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; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: ha_mroonga.cpp (+20 -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, "Liberation Mono", 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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L8922">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L8923">8923</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L8924">8924</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L8925">8925</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-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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L8926">8926</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L8927">8927</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L8928">8928</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L9185">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L9186">9186</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L9187">9187</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L9188">9188</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-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L9189">9189</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L9190">9190</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L9191">9191</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L9192">9192</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-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L9193">9193</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L9194">9194</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0L9195">9195</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; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8922">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8923">8923</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8924">8924</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8925">8925</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8926">8926</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8927">8927</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8928">8928</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8929">8929</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8930">8930</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8931">8931</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8932">8932</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8933">8933</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8934">8934</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8935">8935</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8936">8936</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8937">8937</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R8938">8938</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9195">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9196">9196</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9197">9197</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9198">9198</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9199">9199</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9200">9200</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9201">9201</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9202">9202</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9203">9203</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9204">9204</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9205">9205</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9206">9206</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9207">9207</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9208">9208</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9209">9209</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9210">9210</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9211">9211</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/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9212">9212</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9213">9213</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9214">9214</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/ef0e2dc84be3e230437677cd4e9a7d5b63f87c5e#L0R9215">9215</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; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -8923,6 +8923,16 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">int ha_mroonga::wrapper_get_next_record(uchar *buf)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> key_length = grn_table_cursor_get_key(ctx, cursor, &key);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> GRN_TEXT_SET(ctx, &key_buffer, key, key_length);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (count_skip) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ DBUG_PRINT("info", ("mroonga: count_skip: TRUE"));</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (record_id == GRN_ID_NIL) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ record_id = found_record_id;</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">+ error = 0;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ table->status = 0;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ break;</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">+ }</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"> error = HA_ERR_END_OF_FILE;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> break;</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -9186,10 +9196,20 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">void ha_mroonga::check_count_skip(key_part_map start_key_part_map,</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> count_skip = false;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> DBUG_VOID_RETURN;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (share->wrapper_mode &&</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ !(wrap_handler->ha_table_flags() & HA_NO_TRANSACTIONS)) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ DBUG_PRINT("info", ("mroonga: count skip: transactional wrapper mode"));</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ count_skip = false;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ DBUG_VOID_RETURN;</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"> DBUG_PRINT("info", ("mroonga: count skip: skip enabled"));</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> count_skip = true;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> mrn_count_skip++;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> DBUG_VOID_RETURN;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ } else if (share->wrapper_mode) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ DBUG_PRINT("info", ("mroonga: count skip: wrapper mode"));</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ count_skip = false;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ DBUG_VOID_RETURN;</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"> DBUG_PRINT("info", ("mroonga: count skip: without fulltext"));</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> uint key_nr = active_index;</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>