summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2004-05-14 22:55:45 +0200
committerbugreport%peshkin.net <>2004-05-14 22:55:45 +0200
commit680ffe30d46b1b9921ab1419ac5906a3513a78d5 (patch)
tree50d0a5c93028075a4eb6c532d2a6eb61725a13cf /Bugzilla/User.pm
parent0f65460c98b3b69e4d884adbd20630ce99416d74 (diff)
downloadbugzilla-680ffe30d46b1b9921ab1419ac5906a3513a78d5.tar.gz
bugzilla-680ffe30d46b1b9921ab1419ac5906a3513a78d5.tar.xz
Bug 239263: Avoid hazard in User->groups by switching to main DB for rederive
r=jouni a=justdave
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r--Bugzilla/User.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 50a4e62b7..c9535d7bf 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -107,7 +107,14 @@ sub _create {
$id);
if ($result) {
+ my $is_main_db;
+ unless ($is_main_db = Bugzilla->dbwritesallowed()) {
+ Bugzilla->switch_to_main_db();
+ }
$self->derive_groups($tables_locked_for_derive_groups);
+ unless ($is_main_db) {
+ Bugzilla->switch_to_shadow_db();
+ }
}
return $self;