Shadow Database Usage in the Bugzilla::DB world
gerv at mozilla.org
Tue Oct 25 08:29:00 UTC 2005
David Miller wrote:
> It seems that our usage of shadow databases go completely screwed over
> by the switch to using DBI instead of the old SendSQL and friends. (This
> is a 2.20 regression)
> See https://bugzilla.mozilla.org/show_bug.cgi?id=313695
> The short version is Bugzilla->switch_to_shadow_db() can't change a $dbh
> variable that you already have in your possession.
Well, maybe I'm wrong but surely it _could_ - if we actually issued
proxy objects which our DBI class kept track of, rather than real
objects, and switch_to_shadow_db() walked the list changing them over.
The proxy objects would be identical in interface to real $dbh objects,
and just pass the calls through to their current $real_dbh.
That would rely on people not calling it when they were in the middle of
a DB operation of some sort, which I guess is reasonable.
More information about the developers