<!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">2013-06-11 16:37:25 +0900 (Tue, 11 Jun 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/5236779438299c3029f0a93c57463d4a3c19ba23">5236779438299c3029f0a93c57463d4a3c19ba23</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 lock for mrn_long_term_share related operations</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/5236779438299c3029f0a93c57463d4a3c19ba23#diff-0">ha_mroonga.cpp</a></li>
<li><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#diff-1">mrn_table.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 (+7 -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/5236779438299c3029f0a93c57463d4a3c19ba23#L0L146">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L147">147</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L148">148</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L149">149</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/5236779438299c3029f0a93c57463d4a3c19ba23#L0L150">150</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L151">151</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L152">152</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1778">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1779">1779</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1780">1780</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1781">1781</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-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1782">1782</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1783">1783</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1784">1784</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1786">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1787">1787</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1788">1788</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1789">1789</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/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1790">1790</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1791">1791</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1792">1792</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1845">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1846">1846</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1847">1847</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1848">1848</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/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1849">1849</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1850">1850</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0L1851">1851</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/5236779438299c3029f0a93c57463d4a3c19ba23#L0R146">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R147">147</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R148">148</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R149">149</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/5236779438299c3029f0a93c57463d4a3c19ba23#L0R150">150</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R151">151</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R152">152</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R153">153</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1779">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1780">1780</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1781">1781</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1782">1782</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/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1783">1783</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/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1784">1784</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/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1785">1785</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1786">1786</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1787">1787</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1788">1788</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1790">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1791">1791</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1792">1792</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1793">1793</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/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1794">1794</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/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1795">1795</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1796">1796</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1797">1797</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1798">1798</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1851">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1852">1852</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1853">1853</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1854">1854</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/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1855">1855</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1856">1856</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1857">1857</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L0R1858">1858</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">@@ -147,6 +147,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">handlerton *mrn_hton_ptr;</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> HASH mrn_open_tables;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> pthread_mutex_t mrn_open_tables_mutex;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> HASH mrn_long_term_share;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+pthread_mutex_t mrn_long_term_share_mutex;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> /* internal variables */</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> static grn_ctx mrn_ctx;</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -1779,6 +1780,9 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">static int mrn_init(void *p)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> mrn_open_tables_get_key, 0, 0)) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> goto error_allocated_open_tables_hash_init;</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 ((pthread_mutex_init(&mrn_long_term_share_mutex, NULL) != 0)) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ goto error_allocated_long_term_share_mutex_init;</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 (my_hash_init(&mrn_long_term_share, system_charset_info, 32, 0, 0,</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> mrn_long_term_share_get_key, 0, 0)) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> goto error_allocated_long_term_share_hash_init;</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -1787,6 +1791,8 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">static int mrn_init(void *p)</span></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"> error_allocated_long_term_share_hash_init:</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ pthread_mutex_destroy(&mrn_long_term_share_mutex);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+error_allocated_long_term_share_mutex_init:</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> my_hash_free(&mrn_open_tables);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> error_allocated_open_tables_hash_init:</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> pthread_mutex_destroy(&mrn_open_tables_mutex);</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -1846,6 +1852,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">static int mrn_deinit(void *p)</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"> my_hash_free(&mrn_long_term_share);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ pthread_mutex_destroy(&mrn_long_term_share_mutex);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> my_hash_free(&mrn_open_tables);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> pthread_mutex_destroy(&mrn_open_tables_mutex);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> my_hash_free(&mrn_allocated_thds);</span>
</pre>
</td>
</tr>
</tbody>
</table>
<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: mrn_table.cpp (+5 -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/5236779438299c3029f0a93c57463d4a3c19ba23#L1L52">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L53">53</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L54">54</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L55">55</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/5236779438299c3029f0a93c57463d4a3c19ba23#L1L56">56</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L57">57</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L58">58</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L708">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L709">709</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L710">710</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L711">711</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/5236779438299c3029f0a93c57463d4a3c19ba23#L1L712">712</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/5236779438299c3029f0a93c57463d4a3c19ba23#L1L713">713</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L714">714</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L715">715</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L722">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L723">723</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L724">724</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L725">725</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/5236779438299c3029f0a93c57463d4a3c19ba23#L1L726">726</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L727">727</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1L728">728</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/5236779438299c3029f0a93c57463d4a3c19ba23#L1R52">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R53">53</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R54">54</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R55">55</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/5236779438299c3029f0a93c57463d4a3c19ba23#L1R56">56</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R57">57</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R58">58</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R59">59</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R709">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R710">710</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R711">711</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R712">712</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/5236779438299c3029f0a93c57463d4a3c19ba23#L1R713">713</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/5236779438299c3029f0a93c57463d4a3c19ba23#L1R714">714</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R715">715</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/5236779438299c3029f0a93c57463d4a3c19ba23#L1R716">716</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R717">717</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R718">718</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R719">719</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R726">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R727">727</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R728">728</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R729">729</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/5236779438299c3029f0a93c57463d4a3c19ba23#L1R730">730</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R731">731</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R732">732</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/5236779438299c3029f0a93c57463d4a3c19ba23#L1R733">733</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">@@ -53,6 +53,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">extern "C" {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> extern HASH mrn_open_tables;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> extern pthread_mutex_t mrn_open_tables_mutex;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> extern HASH mrn_long_term_share;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+extern pthread_mutex_t mrn_long_term_share_mutex;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> extern char *mrn_default_parser;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> extern char *mrn_default_wrapper_engine;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> extern handlerton *mrn_hton_ptr;</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -709,7 +710,10 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">int mrn_free_share_alloc(</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> void mrn_free_long_term_share(MRN_LONG_TERM_SHARE *long_term_share)</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_DBUG_ENTER_FUNCTION();</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">+ mrn::Lock lock(&mrn_long_term_share_mutex);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> my_hash_delete(&mrn_long_term_share, (uchar*) long_term_share);</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"> pthread_mutex_destroy(&long_term_share->auto_inc_mutex);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> my_free(long_term_share, MYF(0));</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> DBUG_VOID_RETURN;</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -723,6 +727,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">MRN_LONG_TERM_SHARE *mrn_get_long_term_share(const char *table_name,</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> char *tmp_name;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> MRN_DBUG_ENTER_FUNCTION();</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> DBUG_PRINT("info", ("mroonga: table_name=%s", table_name));</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ mrn::Lock lock(&mrn_long_term_share_mutex);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if (!(long_term_share = (MRN_LONG_TERM_SHARE*)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> my_hash_search(&mrn_long_term_share, (uchar*) table_name,</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> table_name_length)))</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>