From 7c58e97bf6f80a251046c5b3e7bce826fe058bd6 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 29 Jan 2020 13:50:26 +0100 Subject: perfschema memory related instrumentation changes --- sql/hostname.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'sql/hostname.cc') diff --git a/sql/hostname.cc b/sql/hostname.cc index 968914fd56e..edf31c11081 100644 --- a/sql/hostname.cc +++ b/sql/hostname.cc @@ -150,10 +150,9 @@ bool hostname_cache_init() Host_entry tmp; uint key_offset= (uint) ((char*) (&tmp.ip_key) - (char*) &tmp); - if (!(hostname_cache= new Hash_filo(host_cache_size, - key_offset, HOST_ENTRY_KEY_SIZE, - NULL, (my_hash_free_key) free, - &my_charset_bin))) + if (!(hostname_cache= new Hash_filo(key_memory_host_cache_hostname, + host_cache_size, key_offset, HOST_ENTRY_KEY_SIZE, + NULL, (my_hash_free_key) free, &my_charset_bin))) return 1; hostname_cache->clear(); @@ -476,7 +475,8 @@ int ip_to_hostname(struct sockaddr_storage *ip_storage, if (entry->m_host_validated) { if (entry->m_hostname_length) - *hostname= my_strdup(entry->m_hostname, MYF(0)); + *hostname= my_strdup(key_memory_host_cache_hostname, + entry->m_hostname, MYF(0)); DBUG_PRINT("info",("IP (%s) has been found in the cache. " "Hostname: '%s'", @@ -926,7 +926,8 @@ int ip_to_hostname(struct sockaddr_storage *ip_storage, { /* Copy host name string to be stored in the cache. */ - *hostname= my_strdup(hostname_buffer, MYF(0)); + *hostname= my_strdup(key_memory_host_cache_hostname, + hostname_buffer, MYF(0)); if (!*hostname) { -- cgit v1.2.1