httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Darroch <chr...@pearsoncmg.com>
Subject Re: auth dbd pgsql issues
Date Tue, 21 Aug 2007 17:32:56 GMT
Phil Endecott wrote:

> http://marc.info/?l=apache-httpd-users&m=118765132424174&w=2
> 
> My guess is that I'm encountering the known issues with DBD described here:
> http://marc.info/?l=apache-httpd-dev&m=116742014418304&w=2
> 
> Am I right in thinking that this is fixed in the trunk but not in 
> 2.2.4?  What about 2.2.5/6 - I don't see anything in the 2.2.5 changelog.

   I think you're right about the problem you're encountering;
the patches for 2.2.x await a third vote and so they're not in
expected in 2.2.5/6, as it stands at the moment.

> - In mod_authn_dbd.c, a couple of global variables are used to point to 
> the dbd_acquire and dbd_prepare functions.  Am I right in thinking that 
> this means you can have only one dbd driver for authn?  So you can't 
> for example, have postgresql in one virtual host and mysql in another?  

   This shouldn't limit the use of multiple drivers (if you're using
the mod_dbd from trunk).  These mod_authn_dbd globals just point to
common mod_dbd functions.  Assuming there are no underlying
incompatibilities between the drivers (or other bugs), mod_dbd's
functions should invoke the relevant one's functions for each request.

> - It looks as if, when a new db connection is created, all prepared 
> statements are prepared on the new connection.  However, when a new 
> prepared statement is created, it is not prepared on any existing 
> connections.  This is fine as long as all prepared statements are 
> declared before any connections are established.  Correct?

   Yes.  The ap_dbd_prepare() statement must be used during the
configuration phase only.  The trunk code says:

/* Prepare a statement for use by a client module during
 * the server startup/configuration phase.  Can't be called
 * after the server has created its children (use apr_dbd_*).
 */

> - authn_dbd_password() uses the error message "Error looking up %s in 
> database" for 3 different errors.  It would be really great to have 
> different messages in each case.

   I'd suggest opening a Bugzilla report and, if possible, attaching
a patch file with the revised messages you'd like to see (and please add
the keyword PatchAvailable in this case).

> - The mod_authn_dbd docs 
> (http://httpd.apache.org/docs/2.2/mod/mod_authn_dbd.html) claim "DBD 
> drivers recognise both stdio-like %s and native syntax".  Is this 
> accurate?  It seems that the postgresql DBD driver does some type magic 
> based on the character after the %, which wouldn't be possible with the 
> postgresql $1 syntax.  Maybe $1 only works for strings (which would be 
> OK for usernames, of course).  (Does it correctly count the number of 
> parameters if I use $1?)

   I seem to recall some type magic in this driver, but I'm not
particularly familiar with it.  If you encounter problems, I'd again
suggest opening a Bugzilla report.

> - The mod_dbd docs (http://httpd.apache.org/docs/2.2/mod/mod_dbd.html) 
> say that DBDPersist can be 0 or 1; this should be on or off.

   I'll try to remember to fix that, but if you don't see it in
trunk's docs after a while ... submit a Bugzilla report!  :-)

   Thanks,

Chris.

-- 
GPG Key ID: 366A375B
GPG Key Fingerprint: 485E 5041 17E1 E2BB C263  E4DE C8E3 FA36 366A 375B


Mime
View raw message