Fix to bug #510, http://bugs.skysql.com/show_bug.cgi?id=510, made every MaxScale thread to call mysql_thread_init() before entering poll_waitevents. Also main thread does this before starting services. Removed all calls to mysql_thread_init() and to mysql_thread_end() from elsewhere than from poll.c:poll_waitevents and from gateway.c:main

skygw_utils.cc: replace_literal: fixed memory leak
This commit is contained in:
VilhoRaatikka
2014-09-01 19:37:31 +03:00
parent 3c1abf4b64
commit 0fed5c2c5b
5 changed files with 21 additions and 17 deletions

View File

@ -252,9 +252,11 @@ poll_waitevents(void *arg)
static bool process_zombies_only = false; /*< flag for all threads */
DCB *zombies = NULL;
/* Add this thread to the bitmask of running polling threads */
/** Add this thread to the bitmask of running polling threads */
bitmask_set(&poll_mask, thread_id);
/** Init mysql thread context for use with a mysql handle and a parser */
mysql_thread_init();
while (1)
{
#if BLOCKINGPOLL
@ -495,6 +497,8 @@ poll_waitevents(void *arg)
return;
}
} /*< while(1) */
/** Release mysql thread context */
mysql_thread_end();
}
/**