diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2012-04-17 02:13:34 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2012-04-17 02:13:34 +0200 |
commit | b1779f28a5f15f7ad39855e07a27fcda19b8d3f1 (patch) | |
tree | 14c0c9b923070e95ab0d3b970444eb21e9021825 | |
parent | 3988beb8e294613fb4e9ae47ec1d3d8b8e1c4d23 (diff) | |
download | bugzilla-b1779f28a5f15f7ad39855e07a27fcda19b8d3f1.tar.gz bugzilla-b1779f28a5f15f7ad39855e07a27fcda19b8d3f1.tar.xz |
Bug 745080: Voting extension causes database deadlocks
r=glob a=LpSolit
-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 43c5821a7..b4352fa2f 100644 --- a/extensions/Voting/Extension.pm +++ b/extensions/Voting/Extension.pm @@ -467,7 +467,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; |