<!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 &lt;kou****@clear*****&gt;</dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
      <dd style="margin-left: 8.5em">2015-03-14 23:43:14 +0900 (Sat, 14 Mar 2015)</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/4a3a874e2074eedb051d803aad20c5a3e9e72033">4a3a874e2074eedb051d803aad20c5a3e9e72033</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, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">mysql57: follow THD::db type change

I don't know whether THD::db() (LEX_CSTRING) is NULL
terminated. Generally, LEX_CSTRING isn't NULL terminated.

If THD::db() isn't NULL terminated, Mroonga may crash.</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/4a3a874e2074eedb051d803aad20c5a3e9e72033#diff-0">mrn_mysql_compat.h</a></li>
          <li><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#diff-1">udf/mrn_udf_command.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, &quot;Liberation Mono&quot;, 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_mysql_compat.h (+7 -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, &quot;Liberation Mono&quot;, 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/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0L0">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0L1">1</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0L2">2</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/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0L3">3</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0L4">4</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0L5">5</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0L6">6</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0L157">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0L158">158</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0L159">159</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0L160">160</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0L161">161</a></span>
</pre>
            </th>
            <th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, 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/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0R0">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0R1">1</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0R2">2</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</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/4a3a874e2074eedb051d803aad20c5a3e9e72033#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/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0R4">4</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#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/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0R6">6</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0R157">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0R158">158</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0R159">159</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0R160">160</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/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0R161">161</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/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0R162">162</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/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0R163">163</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/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0R164">164</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/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0R165">165</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/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0R166">166</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L0R167">167</a></span>
</pre>
            </th>
            <td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, 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">@@ -1,6 +1,6 @@</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> /* -*- c-basic-offset: 2 -*- */</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> /*</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-  Copyright(C) 2011-2014 Kouhei Sutou &lt;kou****@clear*****&gt;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+  Copyright(C) 2011-2015 Kouhei Sutou &lt;kou****@clear*****&gt;</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">@@ -158,4 +158,10 @@</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #  define MRN_STRING_FREE(string) string.free();</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #endif</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 MYSQL_VERSION_ID &gt;= 50706 &amp;&amp; !defined(MRN_MARIADB_P)</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+#  define MRN_THD_DB_PATH(thd) ((thd)-&gt;db().str)</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">+#  define MRN_THD_DB_PATH(thd) ((thd)-&gt;db)</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+#endif</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"> #endif /* MRN_MYSQL_COMPAT_H_ */</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, &quot;Liberation Mono&quot;, 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: udf/mrn_udf_command.cpp (+1 -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, &quot;Liberation Mono&quot;, 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/4a3a874e2074eedb051d803aad20c5a3e9e72033#L1L67">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L1L68">68</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L1L69">69</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L1L70">70</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/4a3a874e2074eedb051d803aad20c5a3e9e72033#L1L71">71</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L1L72">72</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L1L73">73</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L1L74">74</a></span>
</pre>
            </th>
            <th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, 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/4a3a874e2074eedb051d803aad20c5a3e9e72033#L1R67">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L1R68">68</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L1R69">69</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L1R70">70</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</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/4a3a874e2074eedb051d803aad20c5a3e9e72033#L1R71">71</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L1R72">72</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L1R73">73</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/mroonga/mroonga/commit/4a3a874e2074eedb051d803aad20c5a3e9e72033#L1R74">74</a></span>
</pre>
            </th>
            <td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, 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">@@ -68,7 +68,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">MRN_API my_bool mroonga_command_init(UDF_INIT *initid, UDF_ARGS *args,</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">   grn_ctx_init(&amp;(info-&gt;ctx), 0);</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-    const char *current_db_path = current_thd-&gt;db;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    const char *current_db_path = MRN_THD_DB_PATH(current_thd);</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     const char *action;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     if (current_db_path) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">       action = &quot;open database&quot;;</span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>