Commit 680ffe30 authored by bugreport%peshkin.net's avatar bugreport%peshkin.net

Bug 239263: Avoid hazard in User->groups by switching to main DB for rederive

r=jouni a=justdave
parent 0f65460c
...@@ -107,7 +107,14 @@ sub _create { ...@@ -107,7 +107,14 @@ sub _create {
$id); $id);
if ($result) { 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); $self->derive_groups($tables_locked_for_derive_groups);
unless ($is_main_db) {
Bugzilla->switch_to_shadow_db();
}
} }
return $self; return $self;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment