summaryrefslogtreecommitdiff
path: root/server-tools
diff options
context:
space:
mode:
Diffstat (limited to 'server-tools')
-rw-r--r--server-tools/instance-manager/CMakeLists.txt5
-rw-r--r--server-tools/instance-manager/log.cc8
-rw-r--r--server-tools/instance-manager/thread_registry.cc10
3 files changed, 17 insertions, 6 deletions
diff --git a/server-tools/instance-manager/CMakeLists.txt b/server-tools/instance-manager/CMakeLists.txt
index 3f02ba88f1d..f8a8a7e57d0 100644
--- a/server-tools/instance-manager/CMakeLists.txt
+++ b/server-tools/instance-manager/CMakeLists.txt
@@ -12,6 +12,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
@@ -31,3 +32,7 @@ ADD_EXECUTABLE(mysqlmanager buffer.cc command.cc commands.cc guardian.cc instanc
ADD_DEPENDENCIES(mysqlmanager GenError)
TARGET_LINK_LIBRARIES(mysqlmanager dbug mysys strings taocrypt vio yassl zlib wsock32)
+
+IF(EMBED_MANIFESTS)
+ MYSQL_EMBED_MANIFEST("mysqlmanager" "asInvoker")
+ENDIF(EMBED_MANIFESTS)
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..b06c1240d92 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,8 +64,11 @@ 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);
+ // Disabled assert temporarily - BUG#28030
+ // DBUG_ASSERT(head.next == &head);
pthread_mutex_unlock(&LOCK_thread_registry);
pthread_cond_destroy(&COND_thread_registry_is_empty);