summaryrefslogtreecommitdiff
path: root/storage/perfschema/pfs_host.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/perfschema/pfs_host.cc')
-rw-r--r--storage/perfschema/pfs_host.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/perfschema/pfs_host.cc b/storage/perfschema/pfs_host.cc
index 82b78e19ce8..ac6308ff991 100644
--- a/storage/perfschema/pfs_host.cc
+++ b/storage/perfschema/pfs_host.cc
@@ -42,7 +42,7 @@ static PFS_single_stat *host_instr_class_waits_array= NULL;
static PFS_stage_stat *host_instr_class_stages_array= NULL;
static PFS_statement_stat *host_instr_class_statements_array= NULL;
-static LF_HASH host_hash;
+LF_HASH host_hash;
static bool host_hash_inited= false;
/**
@@ -146,10 +146,11 @@ C_MODE_END
*/
int init_host_hash(void)
{
- if (! host_hash_inited)
+ if ((! host_hash_inited) && (host_max > 0))
{
lf_hash_init(&host_hash, sizeof(PFS_host*), LF_HASH_UNIQUE,
0, 0, host_hash_get_key, &my_charset_bin);
+ /* host_hash.size= host_max; */
host_hash_inited= true;
}
return 0;