On Fri, May 30, 2003 at 12:13:17PM -0400, Rudy Lippan wrote:
> On Thu, 29 May 2003, Tim Bunce wrote:
>
> > > Right now this attribute defaults to
> > > ON for backward compatibility; however, the default behaviour
> > > may change so that auto_reconnect only defaults to on
> > > in a mod_perl env.
> >
> > I hope it will before the release. The current behaviour is unsafe for
> > any application using locks.
>
> OK. I agree with you. -- The reason why I left the behaviour the way
> it was is because do do that you have override the mysql library connect
> defaults.
On a vagely related topic, I think mysql_client_found_rows=1 should
also be the default.
Right now DBD::mysql rows defaults to counting rows *physically
changed* not just 'matched', so:
$rows = $dbh->do("UPDATE table SET foo=7 WHERE id=42");
will return 0 if foo already equals 7. That's very non-standard
behaviour and very rarely wanted.
Whereas it's far more common to want to check that $rows equals
the number of rows you expect the qualifier (id=42) to match.
As a case in point, Class::DBI has code to check just that, but
it's disabled at the moment because of this issue (and that fact that
previous DBD::mysql's could only specify mysql_client_found_rows=1
via the dsn string and not the attribute hash parameter).
Tim.