On Sunday 22 October 2006 08:12, Graham Leggett wrote: > Graham Leggett wrote: > > Graham Leggett wrote: > >> Some digging in the debugger shows that the value of dbd->prepared, > >> the structure in which prepared statements are being kept, has the > >> value 0x00000001. > > > > Digging some more, it seems that the value of ServerName is being used > > as a key for the prepared statement lookups. > > > > > > The problem comes about when ServerName isn't set. While stepping > > through code, the key in one case was calculated as being "*", while in > > another case the key was calculated to be the machine name from "uname > > -a". > > When ap_dbd_prepare() is executed during startup, the global variable > default_hostname resolves to "*". Later on during initialisation when > dbd_post_config() is executed, the global variable default_hostname > resolves to "<local-machine-name>". > > The fix seems to be to hard wire the key to some fixed value rather than > default_hostname, which in itself doesn't seem to be a fixed value. > > Regards, > Graham > --
What revision of mod_dbd are you using? Because, it seems that all these fixes are already done. Refer to the revision log: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/database/mod_dbd.c?r1=432560&view=log ( Relevant fixes: Revisions: 466641, 432560 )