diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2012-04-17 02:15:59 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2012-04-17 02:15:59 +0200 |
commit | d8d3bd333243ebc01630b576a406c6b78725e0bf (patch) | |
tree | 5c136d07f01819f67cb3f5ec5de59b32af140509 /extensions | |
parent | 90225246accea4319d6a1a2ce7b28af5c8e30184 (diff) | |
download | bugzilla-d8d3bd333243ebc01630b576a406c6b78725e0bf.tar.gz bugzilla-d8d3bd333243ebc01630b576a406c6b78725e0bf.tar.xz |
Bug 745080: Voting extension causes database deadlocks
r=glob a=LpSolit
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/Voting/Extension.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/extensions/Voting/Extension.pm b/extensions/Voting/Extension.pm index 6a90176ec..ead81266a 100644 --- a/extensions/Voting/Extension.pm +++ b/extensions/Voting/Extension.pm @@ -486,7 +486,10 @@ sub _page_user { } } - $dbh->do('DELETE FROM votes WHERE vote_count <= 0'); + if ($canedit && $bug) { + $dbh->do('DELETE FROM votes WHERE vote_count = 0 AND who = ?', + undef, $who->id); + } $dbh->bz_commit_transaction(); $vars->{'canedit'} = $canedit; |