diff options
Diffstat (limited to 'sql/keycaches.cc')
-rw-r--r-- | sql/keycaches.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/keycaches.cc b/sql/keycaches.cc index 60049cdd67d..10bec7c1de8 100644 --- a/sql/keycaches.cc +++ b/sql/keycaches.cc @@ -23,6 +23,9 @@ NAMED_ILIST key_caches; NAMED_ILIST rpl_filters; +extern "C" PSI_memory_key key_memory_KEY_CACHE; +extern PSI_memory_key key_memory_NAMED_ILINK_name; + /** ilink (intrusive list element) with a name */ @@ -37,7 +40,8 @@ public: size_t name_length_arg, uchar* data_arg) :name_length(name_length_arg), data(data_arg) { - name= my_strndup(name_arg, name_length, MYF(MY_WME)); + name= my_strndup(key_memory_NAMED_ILINK_name, name_arg, name_length, + MYF(MY_WME)); links->push_back(this); } inline bool cmp(const char *name_cmp, size_t length) @@ -118,8 +122,8 @@ KEY_CACHE *create_key_cache(const char *name, size_t length) DBUG_ENTER("create_key_cache"); DBUG_PRINT("enter",("name: %.*s", (int)length, name)); - if ((key_cache= (KEY_CACHE*) my_malloc(sizeof(KEY_CACHE), - MYF(MY_ZEROFILL | MY_WME)))) + if ((key_cache= (KEY_CACHE*) my_malloc(key_memory_KEY_CACHE, + sizeof(KEY_CACHE), MYF(MY_ZEROFILL | MY_WME)))) { if (!new NAMED_ILINK(&key_caches, name, length, (uchar*) key_cache)) { |