diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-02-17 11:10:26 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-02-17 11:10:26 +0100 |
commit | 7b9c7c18d0189a8e43ed11130757363b290e2f32 (patch) | |
tree | 6e1043f9e8d183df344ca381523c4ff2e06550b5 | |
parent | 713128246417ee3300e01d0a92f540da79bebb7e (diff) | |
download | mariadb-git-7b9c7c18d0189a8e43ed11130757363b290e2f32.tar.gz |
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
-rw-r--r-- | plugin/daemon_example/daemon_example.cc | 1 |
1 files changed, 1 insertions, 0 deletions
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), |