summaryrefslogtreecommitdiff
path: root/sql/rpl_reporting.cc
diff options
context:
space:
mode:
authorAlfranio Correia <alfranio.correia@sun.com>2009-06-16 16:04:30 +0100
committerAlfranio Correia <alfranio.correia@sun.com>2009-06-16 16:04:30 +0100
commit4cb4593bdea737037c4d01bd3fbd7faa2bde5d22 (patch)
treee515a5958fc903a3c834ac3d563d93cfc62e51f2 /sql/rpl_reporting.cc
parent37a5f2d42168d68d8bfb6bdbf4ed90291af49f2a (diff)
downloadmariadb-git-4cb4593bdea737037c4d01bd3fbd7faa2bde5d22.tar.gz
BUG#45511 rpl.rpl_binlog_corruption fails with warning messages in Valgrind
This is a backport of BUG#43076.
Diffstat (limited to 'sql/rpl_reporting.cc')
-rw-r--r--sql/rpl_reporting.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/rpl_reporting.cc b/sql/rpl_reporting.cc
index 28f257790c7..a09140de3c4 100644
--- a/sql/rpl_reporting.cc
+++ b/sql/rpl_reporting.cc
@@ -13,6 +13,7 @@ Slave_reporting_capability::report(loglevel level, int err_code,
va_list args;
va_start(args, msg);
+ pthread_mutex_lock(&err_lock);
switch (level)
{
case ERROR_LEVEL:
@@ -38,6 +39,7 @@ Slave_reporting_capability::report(loglevel level, int err_code,
my_vsnprintf(pbuff, pbuffsize, msg, args);
+ pthread_mutex_unlock(&err_lock);
va_end(args);
/* If the msg string ends with '.', do not add a ',' it would be ugly */
@@ -46,3 +48,8 @@ Slave_reporting_capability::report(loglevel level, int err_code,
(pbuff[0] && *(strend(pbuff)-1) == '.') ? "" : ",",
err_code);
}
+
+Slave_reporting_capability::~Slave_reporting_capability()
+{
+ pthread_mutex_destroy(&err_lock);
+}