[Groonga-mysql-commit] mroonga/mroonga at f16fc12 [master] mysql57: support PSI_memory_key for init_alloc_root()

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Mar 16 22:38:27 JST 2015


Kouhei Sutou	2015-03-16 22:38:27 +0900 (Mon, 16 Mar 2015)

  New Revision: f16fc12b6e1f45989a02186c35421685d56468b4
  https://github.com/mroonga/mroonga/commit/f16fc12b6e1f45989a02186c35421685d56468b4

  Message:
    mysql57: support PSI_memory_key for init_alloc_root()

  Modified files:
    ha_mroonga.cpp
    mrn_mysql_compat.h

  Modified: ha_mroonga.cpp (+2 -2)
===================================================================
--- ha_mroonga.cpp    2015-03-16 22:31:28 +0900 (9333837)
+++ ha_mroonga.cpp    2015-03-16 22:38:27 +0900 (8b81c92)
@@ -2683,7 +2683,7 @@ int ha_mroonga::create_share_for_create() const
       }
     }
   }
-  init_alloc_root(&mem_root_for_create, 1024, 0, MYF(0));
+  mrn_init_alloc_root(&mem_root_for_create, 1024, 0, MYF(0));
   analyzed_for_create = true;
   if (table_list) {
     share_for_create.table_name = table_list->table_name;
@@ -3854,7 +3854,7 @@ int ha_mroonga::wrapper_open(const char *name, int mode, uint test_if_locked)
     }
   }
 
-  init_alloc_root(&mem_root, 1024, 0, MYF(0));
+  mrn_init_alloc_root(&mem_root, 1024, 0, MYF(0));
   wrap_key_info = mrn_create_key_info_for_table(share, table, &error);
   if (error)
     DBUG_RETURN(error);

  Modified: mrn_mysql_compat.h (+9 -2)
===================================================================
--- mrn_mysql_compat.h    2015-03-16 22:31:28 +0900 (f75f310)
+++ mrn_mysql_compat.h    2015-03-16 22:38:27 +0900 (15f8dc3)
@@ -61,8 +61,15 @@
 #  define KEY_N_KEY_PARTS(key) (key)->key_parts
 #endif
 
-#if MYSQL_VERSION_ID < 100000 || !defined(MRN_MARIADB_P)
-#  define init_alloc_root(PTR, SZ1, SZ2, FLAG) init_alloc_root(PTR, SZ1, SZ2)
+#ifdef MRN_MARIADB_P
+#  define mrn_init_alloc_root(PTR, SZ1, SZ2, FLAG) \
+  init_alloc_root(PTR, SZ1, SZ2, FLAG)
+#elif MYSQL_VERSION_ID >= 50706
+#  define mrn_init_alloc_root(PTR, SZ1, SZ2, FLAG) \
+  init_alloc_root(mrn_memory_key, PTR, SZ1, SZ2)
+#else
+#  define mrn_init_alloc_root(PTR, SZ1, SZ2, FLAG) \
+  init_alloc_root(PTR, SZ1, SZ2, FLAG)
 #endif
 
 #if MYSQL_VERSION_ID < 100002 || !defined(MRN_MARIADB_P)
-------------- next part --------------
HTML����������������������������...
다운로드 



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