summaryrefslogtreecommitdiff
path: root/server-tools
diff options
context:
space:
mode:
authormonty@mysql.com/narttu.mysql.fi <>2007-04-16 17:08:29 +0300
committermonty@mysql.com/narttu.mysql.fi <>2007-04-16 17:08:29 +0300
commit72d135bec59d7556736800bf3f9d268897e2832d (patch)
tree66913f618e8d3460513451fab5622e144183cd15 /server-tools
parent455b325b53aa23fa112ad6fe3751d508f017dcb7 (diff)
downloadmariadb-git-72d135bec59d7556736800bf3f9d268897e2832d.tar.gz
Clear field_alloc when it's moved to result set (allows us to always call free_root on field_alloc)
Change to use remove_file instead of 'system rm' in a lot of tests. (Should fix some windows test problems) Removed memory leak in mysql_test if sync_with_master fails. Do not terminate ndb_cluster_binary_log before the util thread has finnished. This should fix a shutdown bug where a thread is accessing injector_mutex after it's freed. Patch may fix Bug#27622 "mysqld shutdown, util thread continues, while binlog thread exits"
Diffstat (limited to 'server-tools')
-rw-r--r--server-tools/instance-manager/log.cc8
-rw-r--r--server-tools/instance-manager/thread_registry.cc7
2 files changed, 10 insertions, 5 deletions
diff --git a/server-tools/instance-manager/log.cc b/server-tools/instance-manager/log.cc
index 145f99db521..9f276523e49 100644
--- a/server-tools/instance-manager/log.cc
+++ b/server-tools/instance-manager/log.cc
@@ -134,7 +134,10 @@ void log_init()
/*
The function is intended to log error messages. It precedes a message
- with date, time and [ERROR] tag and print it to the stderr.
+ with date, time and [ERROR] tag and print it to the stderr and stdout.
+
+ We want to print it on stdout to be able to know in which context we got the
+ error
SYNOPSIS
log_error()
@@ -146,7 +149,10 @@ void log_error(const char *format, ...)
{
va_list args;
va_start(args, format);
+ log(stdout, "ERROR", format, args);
+ fflush(stdout);
log(stderr, "ERROR", format, args);
+ fflush(stderr);
va_end(args);
}
diff --git a/server-tools/instance-manager/thread_registry.cc b/server-tools/instance-manager/thread_registry.cc
index f3a67c5e127..700ed22afe7 100644
--- a/server-tools/instance-manager/thread_registry.cc
+++ b/server-tools/instance-manager/thread_registry.cc
@@ -18,12 +18,9 @@
#endif
#include "thread_registry.h"
-
-#include <my_global.h>
#include <thr_alarm.h>
-
#include <signal.h>
-
+#include "log.h"
#ifndef __WIN__
/* Kick-off signal handler */
@@ -67,6 +64,8 @@ Thread_registry::~Thread_registry()
/* Check that no one uses the repository. */
pthread_mutex_lock(&LOCK_thread_registry);
+ if (head.next != &head)
+ log_error("Not all threads died properly\n");
/* All threads must unregister */
DBUG_ASSERT(head.next == &head);