summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2016-02-08 22:34:41 +0200
committerMonty <monty@mariadb.org>2016-02-08 22:34:41 +0200
commitb3093073b1ec076ad7ef5ef8b8fca9022864a890 (patch)
tree4a703f74b194efb2d02b2acfcf8d91f03deaa1f5 /plugin
parent1ab711bebbd961b8882acf0ac0fbdd1971d54597 (diff)
downloadmariadb-git-b3093073b1ec076ad7ef5ef8b8fca9022864a890.tar.gz
Changed my_thread_id to int64 to fix compilation problem with
my_atomic_add32_explicit on windows Fixed that server_audit.c also works if one compiles with safemalloc Fixed compiler warnings
Diffstat (limited to 'plugin')
-rw-r--r--plugin/server_audit/server_audit.c4
-rw-r--r--plugin/simple_password_check/simple_password_check.c9
2 files changed, 10 insertions, 3 deletions
diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c
index 7831896686e..6e61cdb246b 100644
--- a/plugin/server_audit/server_audit.c
+++ b/plugin/server_audit/server_audit.c
@@ -97,7 +97,11 @@ static void closelog() {}
#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
+#else
#define mysql_mutex_real_mutex(A) &(A)->m_mutex
+#endif
#define flogger_mutex_init(A,B,C) do{}while(0)
#define flogger_mutex_destroy(A) do{}while(0)
diff --git a/plugin/simple_password_check/simple_password_check.c b/plugin/simple_password_check/simple_password_check.c
index dadaa0191a2..f6d3e5b7a69 100644
--- a/plugin/simple_password_check/simple_password_check.c
+++ b/plugin/simple_password_check/simple_password_check.c
@@ -49,15 +49,18 @@ static int validate(MYSQL_LEX_STRING *username, MYSQL_LEX_STRING *password)
others < min_others;
}
-static void fix_min_length(MYSQL_THD thd __attribute__((unused)),
- struct st_mysql_sys_var *var,
- void *var_ptr, const void *save)
+
+static void
+fix_min_length(MYSQL_THD thd __attribute__((unused)),
+ struct st_mysql_sys_var *var __attribute__((unused)),
+ void *var_ptr, const void *save)
{
*((unsigned int *)var_ptr)= *((unsigned int *)save);
if (min_length < min_digits + 2 * min_letters + min_others)
min_length= min_digits + 2 * min_letters + min_others;
}
+
static MYSQL_SYSVAR_UINT(minimal_length, min_length, PLUGIN_VAR_RQCMDARG,
"Minimal required password length", NULL, fix_min_length, 8, 0, 1000, 1);