Monitors that run on separate thread call thread_wait in stopMonitor.

Fixes problem with ordering of calls to mysql_library_end (in main) and mysql_thread_end (in monitor thr).
This commit is contained in:
vraatikka
2013-07-26 11:27:54 +03:00
parent 03e70ab78f
commit 867eab37fc
3 changed files with 29 additions and 26 deletions

View File

@ -48,12 +48,13 @@ typedef struct monitor_servers {
* The handle for an instance of a MySQL Monitor module
*/
typedef struct {
SPINLOCK lock; /**< The monitor spinlock */
int shutdown; /**< Flag to shutdown the monitor thread */
int status; /**< Monitor status */
char *defaultUser; /**< Default username for monitoring */
char *defaultPasswd; /**< Default password for monitoring */
MONITOR_SERVERS *databases; /**< Linked list of servers to monitor */
SPINLOCK lock; /**< The monitor spinlock */
pthread_t tid; /**< id of monitor thread */
int shutdown; /**< Flag to shutdown the monitor thread */
int status; /**< Monitor status */
char *defaultUser; /**< Default username for monitoring */
char *defaultPasswd; /**< Default password for monitoring */
MONITOR_SERVERS *databases; /**< Linked list of servers to monitor */
} MYSQL_MONITOR;
#define MONITOR_RUNNING 1