On Wed, Jul 02, 2003 at 11:42:24AM -0400, Steven N. Hirsch wrote:
> On Wed, 2 Jul 2003, Jan-Pieter Cornet wrote:
> 
> > When connecting via DBD::Proxy from a client with DBI-1.37, to a
> > server running DBI-1.35, I get the following warning on connect
> > [on one long line, but wrapped here to not upset MUAs]:
> > 
> >     DBD::Proxy::db STORE failed: Server returned error: Failed to
> >     execute method CallMethod: Can't set
> >     DBI::ProxyServer::db=HASH(0x8364d50)->{Username}: unrecognised
> >     attribute or invalid value at
> >     /usr/lib/perl5/site_perl/5.6.0/RPC/PlServer.pm line 332
> 
> I will take a look at this, but wasn't aware that any attributes had been 
> added in 1.37.  Tim, was this your patch?

 =head2 Changes in DBI 1.36,    11th May 2003
 ...
  Added Username and Password attributes to connect(..., \%attr) and so
    also embedded in DSN like "dbi:Driver(Username=user,Password=pass):..."
    Username and Password can't contain ")", ",", or "=" characters.
    The predence is DSN first, then \%attr, then $user & $pass parameters,
    and finally the DBI_USER & DBI_PASS environment variables.
    The Username attribute is stored in the $dbh but the Password is not.

> You can blame me for this one!  I will work up a patch to prevent 
> the client from trying a remote disconnect on servers which do not support 
> it.  My bad.

Thanks.

> > When I downgrade DBI to DBI-1.35 on the client, the warning goes away
> > (I can't easily upgrade the server to test if that'd remove the
> > warning too).
> > 
> > At first glance, this seems to be caused by the change in DBI-1.36 to
> > add $attr->{Username} and $dbh->{Username}, or at least the connect
> > warning is.

Yeap.

> > It might be a good idea to fix this in a backward-compatible way.

The changes for the next release include:

  Changed "Can't set ...->{Foo}: unrecognised attribute" from an error to a
    warning when running with DBI::ProxyServer, to simplify upgrades.

meanwhile either upgrade the server or hack DBD::Proxy to treat the
dbh Username attribute as local.

> > I'm sure that mixing DBI versions is more likely to occur. The easiest fix
> > seems to be to just suppress this particular error in the DBD::Proxy, if
> > the warnings are otherwise harmless.
> 
> Agreed.  This one probably slipped through the cracks...

Yes. I think a patch to DBD::Proxy to treat the dbh Username attribute
as local is the best fix. If you could do that I'd be most grateful.

Tim.

Reply via email to