[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] [mysql5.5.19][mysql5.6.4] don't free a malloced string plugin variable.

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 4 10:49:22 JST 2012


Kouhei Sutou	2011-12-21 14:36:05 +0900 (Wed, 21 Dec 2011)

  New Revision: 626d5c4651d5600593b373c4b56e1e4bddd2bdc3
  https://github.com/mroonga/mroonga/commit/626d5c4651d5600593b373c4b56e1e4bddd2bdc3

  Log:
    [mysql5.5.19][mysql5.6.4] don't free a malloced string plugin variable.

  Modified files:
    ha_mroonga.cc
    ha_mroonga.h

  Modified: ha_mroonga.cc (+2 -0)
===================================================================
--- ha_mroonga.cc    2011-12-21 12:58:04 +0900 (9494885)
+++ ha_mroonga.cc    2011-12-21 14:36:05 +0900 (b4a6e5b)
@@ -273,7 +273,9 @@ static void mrn_default_parser_update(THD *thd, struct st_mysql_sys_var *var,
             "default fulltext parser is changed: <%s> -> <%s>",
             *old_value_ptr, new_value);
 
+#ifdef MRN_NEED_FREE_STRING_MEMALLOC_PLUGIN_VAR
     my_free(*old_value_ptr, MYF(0));
+#endif
     *old_value_ptr = my_strdup(new_value, MYF(MY_WME));
   }
   grn_ctx_fin(&ctx);

  Modified: ha_mroonga.h (+5 -0)
===================================================================
--- ha_mroonga.h    2011-12-21 12:58:04 +0900 (2d3b8fd)
+++ ha_mroonga.h    2011-12-21 14:36:05 +0900 (d0457fd)
@@ -91,6 +91,11 @@ extern "C" {
 #  define MRN_HAVE_MYSQL_TYPE_TIME2
 #endif
 
+#if (MYSQL_VERSION_ID < 50519) || \
+    (50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID < 50604)
+#  define MRN_NEED_FREE_STRING_MEMALLOC_PLUGIN_VAR
+#endif
+
 class ha_mroonga;
 
 /* structs */
-------------- next part --------------
HTML����������������������������...
다운로드 



More information about the Groonga-mysql-commit mailing list
Back to archive index