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 library: assumes each thread has it's own connection > if(mysql_thread_safe()) > mysql_thread_end(); > return 0; > }
Is this generally applicable, or would that hurt if several threads share a connection? I wonder if this should be applied to the driver sources. > > 3. build and link the dbd_mysql driver. It MUST be linked agains the _r > version of the mysqlclientlib. This was really tricky on OS X. > I've added an --enable-mysql-threadsafe option to ./configure which allows to optionally link against libmysqlclient_r instead of libmysqlclient. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel