<!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-03-19 18:13:27 +0900 (Mon, 19 Mar 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/27af014a319779f3cd17a115606fe10ffe0e1c78">27af014a319779f3cd17a115606fe10ffe0e1c78</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">path mapper: momoize result</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/27af014a319779f3cd17a115606fe10ffe0e1c78#diff-0">lib/mrn_path_mapper.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: lib/mrn_path_mapper.cpp (+11 -1)</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L1">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L2">2</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L3">3</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L4">4</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L5">5</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L6">6</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L7">7</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L8">8</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L29">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L30">30</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L31">31</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L32">32</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L33">33</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L34">34</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L35">35</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L38">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L39">39</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L40">40</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L41">41</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L42">42</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L43">43</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L44">44</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L59">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L60">60</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L61">61</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L62">62</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L63">63</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L64">64</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0L65">65</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R1">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R2">2</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R3">3</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R4">4</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R5">5</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R6">6</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R7">7</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R8">8</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R29">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R30">30</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R31">31</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R32">32</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R33">33</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R34">34</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R35">35</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R36">36</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R37">37</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R40">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R41">41</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R42">42</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R43">43</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R44">44</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R45">45</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R46">46</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R47">47</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R48">48</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R49">49</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R50">50</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R65">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R66">66</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R67">67</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R68">68</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R69">69</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R70">70</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R71">71</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/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R72">72</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R73">73</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R74">74</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/27af014a319779f3cd17a115606fe10ffe0e1c78#L0R75">75</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">@@ -2,7 +2,7 @@</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> /*</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> Copyright(C) 2010 Tetsuro IKEDA</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> Copyright(C) 2011-2012 Kentoku SHIBA</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- Copyright(C) 2011 Kouhei Sutou <kou****@clear*****></span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ Copyright(C) 2011-2012 Kouhei Sutou <kou****@clear*****></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> This library is free software; you can redistribute it and/or</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> modify it under the terms of the GNU Lesser General Public</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -30,6 +30,8 @@</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> namespace mrn {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> PathMapper::PathMapper(const char *mysql_path)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> : mysql_path_(mysql_path) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ db_path_[0] = '\0';</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ db_name_[0] = '\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"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> /**</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -39,6 +41,10 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">namespace mrn {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> * "/tmp/mysql-test/var/tmp/mysqld.1/#sql27c5_1_0.mrn"</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> */</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> const char *PathMapper::db_path() {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (db_path_[0] != '\0') {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ return db_path_;</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"> if (strncmp(mysql_path_, "./", 2) == 0) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> int i = 2, j = 0, len;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> len = strlen(mysql_path_);</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -60,6 +66,10 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">namespace mrn {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> * "/tmp/mysql-test/var/tmp/mysqld.1/#sql27c5_1_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"> const char *PathMapper::db_name() {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (db_name_[0] != '\0') {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ return db_name_;</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"> if (strncmp(mysql_path_, "./", 2) == 0) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> int i = 2, j = 0, len;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> len = strlen(mysql_path_);</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>