summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorlars@mysql.com <>2005-07-12 06:01:26 +0200
committerlars@mysql.com <>2005-07-12 06:01:26 +0200
commitdc55af92ffee58f45f9c53cbeda7ca34931f2f74 (patch)
treef7de32bd10b044006d73d19056f6c34642614d03 /sql
parent0c5ac2dd5bc8ff436969f7df2d73cdd27ae42a27 (diff)
downloadmariadb-git-dc55af92ffee58f45f9c53cbeda7ca34931f2f74.tar.gz
BUG#6987: Added note when stat is failing on relay log, added mutex for log rotatation.
Diffstat (limited to 'sql')
-rw-r--r--sql/log.cc2
-rw-r--r--sql/slave.cc2
2 files changed, 4 insertions, 0 deletions
diff --git a/sql/log.cc b/sql/log.cc
index c8a3b512b6d..a67f35e30bf 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -853,6 +853,8 @@ int MYSQL_LOG::purge_logs(const char *to_log,
of space that deletion will free. In most cases,
deletion won't work either, so it's not a problem.
*/
+ sql_print_information("Failed to execute my_stat on file '%s'",
+ log_info.log_file_name);
tmp= 0;
}
}
diff --git a/sql/slave.cc b/sql/slave.cc
index 5a2d3af3845..68769fc1f98 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -4462,6 +4462,7 @@ void rotate_relay_log(MASTER_INFO* mi)
RELAY_LOG_INFO* rli= &mi->rli;
lock_slave_threads(mi);
+ pthread_mutex_lock(&mi->data_lock);
pthread_mutex_lock(&rli->data_lock);
/*
We need to test inited because otherwise, new_file() will attempt to lock
@@ -4492,6 +4493,7 @@ void rotate_relay_log(MASTER_INFO* mi)
rli->relay_log.harvest_bytes_written(&rli->log_space_total);
end:
pthread_mutex_unlock(&rli->data_lock);
+ pthread_mutex_unlock(&mi->data_lock);
unlock_slave_threads(mi);
DBUG_VOID_RETURN;
}