Re: [Libdbi-drivers-devel] mysql libdbi driver compiled against libmysqlclient not libmysqlclient_r

2010-09-02 Thread Markus Hoenicka
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**.

Re: [Libdbi-drivers-devel] mysql libdbi driver compiled against libmysqlclient not libmysqlclient_r

2010-09-01 Thread Markus Hoenicka
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

Re: [Libdbi-drivers-devel] mysql libdbi driver compiled against libmysqlclient not libmysqlclient_r

2010-09-01 Thread Ethan Funk
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

Re: [Libdbi-drivers-devel] mysql libdbi driver compiled against libmysqlclient not libmysqlclient_r

2010-08-19 Thread Emmanuel Courreges
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

Re: [Libdbi-drivers-devel] mysql libdbi driver compiled against libmysqlclient not libmysqlclient_r

2010-08-19 Thread Kjell Irgens
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

[Libdbi-drivers-devel] mysql libdbi driver compiled against libmysqlclient not libmysqlclient_r

2010-08-18 Thread Shaofeng Yang
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