| List: | MySQL++ | « Previous MessageNext Message » | |
| From: | Jonathan Wakely | Date: | March 30 2011 1:27pm |
| Subject: | Re: thread_start() should ALWAYS be called after mysql_init() | ||
| View as plain text | |||
On 30 March 2011 14:03, KiberGus wrote: > Today I've stucked in quite a veird bug. My application was written according to > http://tangentsoft.net/mysql++/doc/html/userman/threads.html > And > mysqlpp::Connection::thread_start(); > was called before grabbing connection from connection pool. > thread_start was called before mysql_init on a first call. As a result > pthread_getspecific() was called with an unallocated pthread key as an > argument. This bug is especially hard to find because thread key has 0 > value by default and would recieve 0 value on first call to > pthread_key_create. So you would never notice this if you don't use > thread specific pointers anywhere else beside mysql. > But i have used libmysql which uses it too. Isn't this a bug in mysql_thread_init, as calling that is all that Connection::thread_start does?
| Thread | ||
|---|---|---|
| • thread_start() should ALWAYS be called after mysql_init() | KiberGus | 30 Mar |
| • Re: thread_start() should ALWAYS be called after mysql_init() | Jonathan Wakely | 30 Mar |
| • Re: thread_start() should ALWAYS be called after mysql_init() | KiberGus | 30 Mar |
| • Re: thread_start() should ALWAYS be called after mysql_init() | Warren Young | 31 Mar |
| • Re: thread_start() should ALWAYS be called after mysql_init() | KiberGus | 4 Apr |
| • Re: thread_start() should ALWAYS be called after mysql_init() | KiberGus | 4 Apr |
| • Re: thread_start() should ALWAYS be called after mysql_init() | Warren Young | 4 Apr |
| • Re: thread_start() should ALWAYS be called after mysql_init() | Warren Young | 4 Apr |
| • Re: thread_start() should ALWAYS be called after mysql_init() | Raymond Boettcher | 5 Apr |
