From 7b9c7c18d0189a8e43ed11130757363b290e2f32 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 17 Feb 2014 11:10:26 +0100 Subject: [PATCH] MDEV-5654 Server crashes on second installation of daemon_example plugin daemon plugin: join the thread to make sure it exits before the plugin is unloaded --- plugin/daemon_example/daemon_example.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/daemon_example/daemon_example.cc b/plugin/daemon_example/daemon_example.cc index ec2979de3c3..09b81caeaf4 100644 --- a/plugin/daemon_example/daemon_example.cc +++ b/plugin/daemon_example/daemon_example.cc @@ -162,6 +162,7 @@ static int daemon_example_plugin_deinit(void *p __attribute__ ((unused))) struct tm tm_tmp; pthread_cancel(con->heartbeat_thread); + pthread_join(con->heartbeat_thread, NULL); localtime_r(&result, &tm_tmp); my_snprintf(buffer, sizeof(buffer),