summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-05-07 10:21:41 +0200
committerSergei Golubchik <sergii@pisem.net>2014-05-07 10:21:41 +0200
commit374f0751a23dc6aa854badc007ac797fcc776ccc (patch)
treee9c22aaf5be2a7ebece89b2ebbd5ed367610b911 /plugin
parent3427fd037822722da4d51db47c51d9621567283d (diff)
parent7226287c066228a216217c43c48f3a0a833d9909 (diff)
downloadmariadb-git-374f0751a23dc6aa854badc007ac797fcc776ccc.tar.gz
null-merge from perfschema-5.6 merge tree
(only new files and small style changes are accepted)
Diffstat (limited to 'plugin')
-rw-r--r--plugin/server_audit/server_audit.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c
index becea65dd4a..969714bf16f 100644
--- a/plugin/server_audit/server_audit.c
+++ b/plugin/server_audit/server_audit.c
@@ -135,6 +135,16 @@ static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)),
#undef MYSQL_SERVICE_LOGGER_INCLUDED
#undef MYSQL_DYNAMIC_PLUGIN
#define FLOGGER_NO_PSI
+
+/* How to access the pthread_mutex in mysql_mutex_t */
+#ifdef SAFE_MUTEX
+#define mysql_mutex_real_mutex(A) &(A)->m_mutex.mutex
+#elif defined(MY_PTHREAD_FASTMUTEX)
+#define mysql_mutex_real_mutex(A) &(A)->m_mutex.mutex
+#else
+#define mysql_mutex_real_mutex(A) &(A)->m_mutex
+#endif
+
#define flogger_mutex_init(A,B,C) pthread_mutex_init(mysql_mutex_real_mutex(B), C)
#define flogger_mutex_destroy(A) pthread_mutex_destroy(mysql_mutex_real_mutex(A))
#define flogger_mutex_lock(A) pthread_mutex_lock(mysql_mutex_real_mutex(A))