summaryrefslogtreecommitdiff
path: root/storage/perfschema
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2021-02-05 12:52:48 +1100
committerDaniel Black <daniel@mariadb.org>2021-02-24 19:45:58 +1100
commit2628fa2dba31a779b9bfc12bbcce0210e97f8c56 (patch)
tree56af881f38a8e4fe068bc9db55b2a9a9c854f478 /storage/perfschema
parentad0f0d2b1a037c1774bc0aecc8ed1e7cf1847e55 (diff)
downloadmariadb-git-2628fa2dba31a779b9bfc12bbcce0210e97f8c56.tar.gz
MDEV-20857: perf schema conflict name filename_hash
filename_hash is a function from libiberty.a from the system but also an expored name in the perf schema static library. We'll use a different name.
Diffstat (limited to 'storage/perfschema')
-rw-r--r--storage/perfschema/pfs_engine_table.cc4
-rw-r--r--storage/perfschema/pfs_instr.cc20
-rw-r--r--storage/perfschema/pfs_instr.h2
3 files changed, 13 insertions, 13 deletions
diff --git a/storage/perfschema/pfs_engine_table.cc b/storage/perfschema/pfs_engine_table.cc
index e2ad190c435..acab0e73a3d 100644
--- a/storage/perfschema/pfs_engine_table.cc
+++ b/storage/perfschema/pfs_engine_table.cc
@@ -1233,11 +1233,11 @@ bool pfs_show_status(handlerton *hton, THD *thd,
break;
case 141:
name= "(filename_hash).count";
- size= filename_hash.count;
+ size= pfs_filename_hash.count;
break;
case 142:
name= "(filename_hash).size";
- size= filename_hash.size;
+ size= pfs_filename_hash.size;
break;
case 143:
name= "(host_hash).count";
diff --git a/storage/perfschema/pfs_instr.cc b/storage/perfschema/pfs_instr.cc
index ca9e0385021..fd8da77fe40 100644
--- a/storage/perfschema/pfs_instr.cc
+++ b/storage/perfschema/pfs_instr.cc
@@ -143,7 +143,7 @@ PFS_thread *thread_array= NULL;
File instrumentation instances array.
@sa file_max
@sa file_lost
- @sa filename_hash
+ @sa pfs_filename_hash
*/
PFS_file *file_array= NULL;
@@ -189,8 +189,8 @@ static unsigned char *history_stmts_digest_token_array= NULL;
static char *thread_session_connect_attrs_array= NULL;
/** Hash table for instrumented files. */
-LF_HASH filename_hash;
-/** True if filename_hash is initialized. */
+LF_HASH pfs_filename_hash;
+/** True if pfs_filename_hash is initialized. */
static bool filename_hash_inited= false;
/**
@@ -586,7 +586,7 @@ int init_file_hash(void)
{
if ((! filename_hash_inited) && (file_max > 0))
{
- lf_hash_init(&filename_hash, sizeof(PFS_file*), LF_HASH_UNIQUE,
+ lf_hash_init(&pfs_filename_hash, sizeof(PFS_file*), LF_HASH_UNIQUE,
0, 0, filename_hash_get_key, &my_charset_bin);
/* filename_hash.size= file_max; */
filename_hash_inited= true;
@@ -599,7 +599,7 @@ void cleanup_file_hash(void)
{
if (filename_hash_inited)
{
- lf_hash_destroy(&filename_hash);
+ lf_hash_destroy(&pfs_filename_hash);
filename_hash_inited= false;
}
}
@@ -1186,7 +1186,7 @@ void destroy_thread(PFS_thread *pfs)
}
/**
- Get the hash pins for @filename_hash.
+ Get the hash pins for @pfs_filename_hash.
@param thread The running thread.
@returns The LF_HASH pins for the thread.
*/
@@ -1196,7 +1196,7 @@ LF_PINS* get_filename_hash_pins(PFS_thread *thread)
{
if (! filename_hash_inited)
return NULL;
- thread->m_filename_hash_pins= lf_hash_get_pins(&filename_hash);
+ thread->m_filename_hash_pins= lf_hash_get_pins(&pfs_filename_hash);
}
return thread->m_filename_hash_pins;
}
@@ -1314,7 +1314,7 @@ find_or_create_file(PFS_thread *thread, PFS_file_class *klass,
search:
entry= reinterpret_cast<PFS_file**>
- (lf_hash_search(&filename_hash, pins,
+ (lf_hash_search(&pfs_filename_hash, pins,
normalized_filename, normalized_length));
if (entry && (entry != MY_ERRPTR))
{
@@ -1359,7 +1359,7 @@ search:
pfs->m_identity= (const void *)pfs;
int res;
- res= lf_hash_insert(&filename_hash, thread->m_filename_hash_pins,
+ res= lf_hash_insert(&pfs_filename_hash, thread->m_filename_hash_pins,
&pfs);
if (likely(res == 0))
{
@@ -1426,7 +1426,7 @@ void destroy_file(PFS_thread *thread, PFS_file *pfs)
LF_PINS *pins= get_filename_hash_pins(thread);
DBUG_ASSERT(pins != NULL);
- lf_hash_delete(&filename_hash, pins,
+ lf_hash_delete(&pfs_filename_hash, pins,
pfs->m_filename, pfs->m_filename_length);
if (klass->is_singleton())
klass->m_singleton= NULL;
diff --git a/storage/perfschema/pfs_instr.h b/storage/perfschema/pfs_instr.h
index 81bc52d1d75..a5ff3b4a17d 100644
--- a/storage/perfschema/pfs_instr.h
+++ b/storage/perfschema/pfs_instr.h
@@ -698,7 +698,7 @@ void update_socket_derived_flags();
/** Update derived flags for all instruments. */
void update_instruments_derived_flags();
-extern LF_HASH filename_hash;
+extern LF_HASH pfs_filename_hash;
/** @} */
#endif