Closed Bug 277013 Opened 20 years ago Closed 20 years ago

voting generates an SQL error if your vote is the one that would confirm the bug

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

2.18
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

Attachments

(1 file, 1 obsolete file)

If you vote for a bug and the total number of votes becomes high enough to
confirm that bug, a SQL error is generated because of LOCK TABLE. This is due to
CheckIfVotedConfirmed() which should be outside the LOCK TABLE and UNLOCK TABLE.

My patch in bug 276605 will fix it.

This problem appears in both 2.18 and the trunk.
Status: NEW → ASSIGNED
Flags: blocking2.20?
Flags: blocking2.18?
Whiteboard: [blocker will fix]
Blocks: 250440
Severity: major → critical
Flags: blocking2.20?
Flags: blocking2.20+
Flags: blocking2.18?
Flags: blocking2.18+
Summary: confirmed by popular vote is broken → voting generates an SQL error if your vote is the one that would confirm the bug
Target Milestone: --- → Bugzilla 2.18
Attached patch fix the SQL error, v1 (obsolete) — Splinter Review
Because Dave and Marc prefer this solution, I finally splitted my patch in bug
276605 into two distinct parts. Here is the one about the SQL error only.
Attachment #170460 - Flags: review?(wurblzap)
Blocks: 276605
No longer depends on: 276605
Whiteboard: [blocker will fix] → patch waiting for review
*Note* I wrote this patch with Vlad's patch from bug 276600 already checked in.
So his patch has to land before mine.
Depends on: 276600
Comment on attachment 170460 [details] [diff] [review]
fix the SQL error, v1

Ok, this is it :)

Let's keep the hackiness of header_done :/

As discussed on IRC, there are a couple of tables missing when supportwatchers
is on. These are

   profiles AS watchers READ
   profiles AS watched READ
   watch READ

Please add these and carry r+ forward. We'll need to wait for bug 276600 then.

Whew.

[On a related note, it is indeed possible to print $cgi->header() more than
once (see bug 276605, comment 6) -- CGI::header keeps track of having been
called. So that worry is off my chest.]
Attachment #170460 - Flags: review?(wurblzap) → review+
Adding missing watch, watchers and watched tables, per Marc's previous comment.
Forwarding r+ too.
Attachment #170460 - Attachment is obsolete: true
Attachment #170475 - Flags: review+
This patch applies cleanly to the trunk and the 2.18 branch.
Flags: approval?
Flags: approval2.18?
Whiteboard: patch waiting for review → patch waiting for approval
Flags: approval?
Flags: approval2.18?
Flags: approval2.18+
Flags: approval+
Whiteboard: patch waiting for approval → patch awaiting checkin
Checking in CGI.pl;
/cvsroot/mozilla/webtools/bugzilla/CGI.pl,v  <--  CGI.pl
new revision: 1.221; previous revision: 1.220
done
Checking in votes.cgi;
/cvsroot/mozilla/webtools/bugzilla/votes.cgi,v  <--  votes.cgi
new revision: 1.21; previous revision: 1.20
done
Checking in template/en/default/bug/votes/list-for-user.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/votes/list-for-user.html.tmpl,v
 <--  list-for-user.html.tmpl
new revision: 1.16; previous revision: 1.15
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Checking in CGI.pl;
/cvsroot/mozilla/webtools/bugzilla/CGI.pl,v  <--  CGI.pl
new revision: 1.211.2.7; previous revision: 1.211.2.6
done
Checking in votes.cgi;
/cvsroot/mozilla/webtools/bugzilla/votes.cgi,v  <--  votes.cgi
new revision: 1.17.2.1; previous revision: 1.17
done
Checking in template/en/default/bug/votes/list-for-user.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/votes/list-for-user.html.tmpl,v
 <--  list-for-user.html.tmpl
new revision: 1.15.2.1; previous revision: 1.15
done
Whiteboard: patch awaiting checkin
Blocks: 278136
*** Bug 300215 has been marked as a duplicate of this bug. ***
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: