apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Moriyoshi Koizumi <moriyo...@at.wakwak.com>
Subject Re: [PATCH] apr_dbd_mysql.c
Date Sat, 25 Aug 2007 00:25:23 GMT

(DISCLAIMER: I guess I'm missing something, I'm not an expert of dbd.)

That seems an interesting problem; mysql_thread_init() needs to be 
called on every thread creation in order to initialize per-thread stuff 
(TLS), while the apr_dbd_driver_t ABI doesn't provide such ones that 
allows developers to init / clean it up as far as I know. Otherwise 
apr_dbd_driver_t::init is expected to do the task?

Indeed apr_dbd_mysql.c does the wrong thing in the initializer if the 
code I'm supposed to look at is the following one:

(From http://apache.webthing.com/svn/apache/apr/apr_dbd_mysql.c)
static void dbd_mysql_init(apr_pool_t *pool)

    /* FIXME: this is a guess; find out what it really does */ 
    apr_pool_cleanup_register(pool, NULL, thread_end, apr_pool_cleanup_null);


Bojan Smojver wrote:
> On Thu, 2007-08-23 at 09:49 +0900, 玉越大輝 wrote:
>> Please patch the attached file to apr_dbd_mysql.c in order to make it
>> works with threaded mpm.
>> The current code works only with prework mpm.
> MySQL manual claims that this function (mysql_thread_init()), gets
> called by mysql_init():
> http://dev.mysql.com/doc/refman/4.1/en/mysql-thread-init.html
> http://dev.mysql.com/doc/refman/5.0/en/mysql-thread-init.html
> http://dev.mysql.com/doc/refman/5.1/en/mysql-thread-init.html
> What kind of errors are you getting?

View raw message