summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@skysql.com>2014-05-21 11:09:55 -0400
committerNirbhay Choubey <nirbhay@skysql.com>2014-05-21 11:09:55 -0400
commit086af8367ed2499adae378638225ceb14c85f046 (patch)
tree953720d86a4decd67a24b560ffbe277900ff9609 /mysys
parent558995ad84ca1348dfe681a8d111650225fcc205 (diff)
parent1170a54060168d885cbf682836342d4fc4ccae1a (diff)
downloadmariadb-git-086af8367ed2499adae378638225ceb14c85f046.tar.gz
bzr merge -r4209 maria/10.0.
Diffstat (limited to 'mysys')
-rw-r--r--mysys/file_logger.c24
-rw-r--r--mysys/mf_arr_appstr.c1
-rw-r--r--mysys/mf_qsort2.c1
-rw-r--r--mysys/my_alarm.c1
-rw-r--r--mysys/my_libwrap.c1
5 files changed, 20 insertions, 8 deletions
diff --git a/mysys/file_logger.c b/mysys/file_logger.c
index da8b5c8d531..394b59f6378 100644
--- a/mysys/file_logger.c
+++ b/mysys/file_logger.c
@@ -20,6 +20,13 @@
#include <mysql/service_logger.h>
#include <my_pthread.h>
+#ifndef flogger_mutex_init
+#define flogger_mutex_init(A,B,C) mysql_mutex_init(A,B,C)
+#define flogger_mutex_destroy(A) mysql_mutex_destroy(A)
+#define flogger_mutex_lock(A) mysql_mutex_lock(A)
+#define flogger_mutex_unlock(A) mysql_mutex_unlock(A)
+#endif /*flogger_mutex_init*/
+
#ifdef HAVE_PSI_INTERFACE
/* These belong to the service initialization */
static PSI_mutex_key key_LOCK_logger_service;
@@ -82,7 +89,8 @@ LOGGER_HANDLE *logger_open(const char *path,
return 0; /* End of memory */
}
*l_perm= new_log;
- mysql_mutex_init(key_LOCK_logger_service, &l_perm->lock, MY_MUTEX_INIT_FAST);
+ flogger_mutex_init(key_LOCK_logger_service, &l_perm->lock,
+ MY_MUTEX_INIT_FAST);
return l_perm;
}
@@ -90,7 +98,7 @@ int logger_close(LOGGER_HANDLE *log)
{
int result;
File file= log->file;
- mysql_mutex_destroy(&log->lock);
+ flogger_mutex_destroy(&log->lock);
my_free(log);
if ((result= my_close(file, MYF(0))))
errno= my_errno;
@@ -147,7 +155,7 @@ int logger_vprintf(LOGGER_HANDLE *log, const char* fmt, va_list ap)
char cvtbuf[1024];
size_t n_bytes;
- mysql_mutex_lock(&log->lock);
+ flogger_mutex_lock(&log->lock);
if (log->rotations > 0)
if ((filesize= my_tell(log->file, MYF(0))) == (my_off_t) -1 ||
((unsigned long long)filesize >= log->size_limit &&
@@ -165,7 +173,7 @@ int logger_vprintf(LOGGER_HANDLE *log, const char* fmt, va_list ap)
result= my_write(log->file, (uchar *) cvtbuf, n_bytes, MYF(0));
exit:
- mysql_mutex_unlock(&log->lock);
+ flogger_mutex_unlock(&log->lock);
return result;
}
@@ -175,7 +183,7 @@ int logger_write(LOGGER_HANDLE *log, const char *buffer, size_t size)
int result;
my_off_t filesize;
- mysql_mutex_lock(&log->lock);
+ flogger_mutex_lock(&log->lock);
if (log->rotations > 0)
if ((filesize= my_tell(log->file, MYF(0))) == (my_off_t) -1 ||
((unsigned long long)filesize >= log->size_limit &&
@@ -189,7 +197,7 @@ int logger_write(LOGGER_HANDLE *log, const char *buffer, size_t size)
result= my_write(log->file, (uchar *) buffer, size, MYF(0));
exit:
- mysql_mutex_unlock(&log->lock);
+ flogger_mutex_unlock(&log->lock);
return result;
}
@@ -197,9 +205,9 @@ exit:
int logger_rotate(LOGGER_HANDLE *log)
{
int result;
- mysql_mutex_lock(&log->lock);
+ flogger_mutex_lock(&log->lock);
result= do_rotate(log);
- mysql_mutex_unlock(&log->lock);
+ flogger_mutex_unlock(&log->lock);
return result;
}
diff --git a/mysys/mf_arr_appstr.c b/mysys/mf_arr_appstr.c
index 5ea0a098c5d..d5a0e0707dc 100644
--- a/mysys/mf_arr_appstr.c
+++ b/mysys/mf_arr_appstr.c
@@ -1,4 +1,5 @@
/* Copyright (C) 2007 MySQL AB
+ Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/mysys/mf_qsort2.c b/mysys/mf_qsort2.c
index 29f92c38926..501f08c5dce 100644
--- a/mysys/mf_qsort2.c
+++ b/mysys/mf_qsort2.c
@@ -1,4 +1,5 @@
/* Copyright (C) 2000 MySQL AB
+ Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/mysys/my_alarm.c b/mysys/my_alarm.c
index 31f98958f61..4672627a908 100644
--- a/mysys/my_alarm.c
+++ b/mysys/my_alarm.c
@@ -1,4 +1,5 @@
/* Copyright (C) 2000 MySQL AB
+ Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/mysys/my_libwrap.c b/mysys/my_libwrap.c
index 1cbfa83030b..6c69757ec6f 100644
--- a/mysys/my_libwrap.c
+++ b/mysys/my_libwrap.c
@@ -1,4 +1,5 @@
/* Copyright (c) 2003, 2006 MySQL AB
+ Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by