Ethan Funk et...@redmountainradio.com was heard to say:
Even with libdbi linked against the libmysqlclient_r library, the
API is not thread safe with out the mysql_thread_start() and
mysql_thread_end() calls on a **shared** connection, so including my
change would not **hurt**.
Ethan Funk writes:
2. Modify the dbd_mysql.c source file, changing dbd_disconnect as follows:
int dbd_disconnect(dbi_conn_t *conn) {
if (conn-connection) mysql_close((MYSQL *)conn-connection);
// added the next three lines to resolve memory leak in threadsafe
mysqlclient
My understanding of what's going on under the hood of the mysqlclient_r library
is fuzzy a best. I based my code changes on some very poor documentation
regarding threading from the MySQL folks. The indication was that you call
mysql_thread_start() when you begin using the library in a thread
I successfully use libdbi in production with MySQL and Postgres servers in
multithreading, but by multithreading I mean that I am using one connection
per thread, and a variable pool of threads, with connections to MySQL and
Postgres on the same libdbi instance. A server going down does not cause
On 08/19/2010 10:24 AM, Markus Hoenicka wrote:
I'm not familiar with thread-safe programming, so I have no idea if
libdbi is currently thread-safe. Someone more familiar with this issue
should speak up.
I don't know if it is thread safe, I haven't really looked into that
really. I just
Greeting,
I am working on a thread pool with libdbi and libdbi-driver-mysql. i saw a
problem that program crashes if mysql server goes away for one thread. i am
using the thread safe version of libdbi and the design of my thread pool
doesn't have problems. The problem comes out from libdbi mysql