diff options
author | lpsolit%gmail.com <> | 2005-06-11 02:19:21 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-06-11 02:19:21 +0000 |
commit | 19630bdbdff44d9286ca489c39d3eaf52f391f5c (patch) | |
tree | b65d0ef9e72726605101e8f077831a2ad655587e /process_bug.cgi | |
parent | a41ac397cb8755475aaeb9221f5de94b90f3df75 (diff) | |
download | bugs-19630bdbdff44d9286ca489c39d3eaf52f391f5c.tar bugs-19630bdbdff44d9286ca489c39d3eaf52f391f5c.tar.gz bugs-19630bdbdff44d9286ca489c39d3eaf52f391f5c.tar.bz2 bugs-19630bdbdff44d9286ca489c39d3eaf52f391f5c.tar.xz bugs-19630bdbdff44d9286ca489c39d3eaf52f391f5c.zip |
Bug 277417: SQL error when reloading the page after changing the bug resolution to duplicate - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wicked a=justdave
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-x | process_bug.cgi | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/process_bug.cgi b/process_bug.cgi index 7b0dd6a8a..34444dfcf 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -1038,6 +1038,16 @@ SWITCH: for ($cgi->param('knob')) { ThrowUserError("dupe_of_self_disallowed"); } + # Make sure the bug is not already marked as a dupe + # (may appear in race condition) + my $dupe_of = + $dbh->selectrow_array("SELECT dupe_of FROM duplicates + WHERE dupe = ?", + undef, $cgi->param('id')); + if ($dupe_of) { + ThrowUserError("dupe_entry_found", { dupe_of => $dupe_of }); + } + # DUPLICATE bugs should have no time remaining. _remove_remaining_time(); |