Closed Bug 217422 Opened 21 years ago Closed 21 years ago

"0" is missing in "votes: 0" (MySQL 4)

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.16

People

(Reporter: jruderman, Assigned: justdave)

References

()

Details

(Whiteboard: [fixed in 2.16.4] [fixed in 2.17.5])

Attachments

(2 files)

In bugs with 0 votes, the "0" doesn't appear. In a bug with more than 0 votes, the number does appear. Dave Miller says: mysql> select sum(votes.count) from votes where bug_id=216434; +------------------+ | sum(votes.count) | +------------------+ | NULL | +------------------+ 1 row in set (0.00 sec) MySQL 4 returns NULL if there were no matching values to count. MySQL 3.23 returned 0.
This is in Bug.pm. fixing component
Component: Bugzilla-General → Creating/Changing Bugs
Attached patch PatchSplinter Review
Attachment #130454 - Flags: review?(myk)
Target Milestone: --- → Bugzilla 2.18
Comment on attachment 130454 [details] [diff] [review] Patch Won't work in pg, but r=bbaetz since we don't have an abstraction layer for hose sort of non-standard mysql-isms yet.
Attachment #130454 - Flags: review?(myk) → review+
Checking in Bug.pm; /cvsroot/mozilla/webtools/bugzilla/Bug.pm,v <-- Bug.pm new revision: 1.33; previous revision: 1.32 done
Status: NEW → RESOLVED
Closed: 21 years ago
Flags: approval+
Resolution: --- → FIXED
Low risk, needed for MySQL 4 compatibility. Nominating for 2.16 branch.
Whiteboard: [wanted for 2.16.4] [fixed in 2.17.5]
Target Milestone: Bugzilla 2.18 → Bugzilla 2.16
Attachment #132158 - Flags: review?(bbaetz)
Attachment #132158 - Flags: review?(bbaetz) → review+
checked in on 2.16 branch Checking in Bug.pm; /cvsroot/mozilla/webtools/bugzilla/Bug.pm,v <-- Bug.pm new revision: 1.12.2.1; previous revision: 1.12 done
OS: Windows XP → All
Hardware: PC → All
Whiteboard: [wanted for 2.16.4] [fixed in 2.17.5] → [fixed in 2.16.4] [fixed in 2.17.5]
Blocks: 225474
Comment on attachment 132158 [details] [diff] [review] Patch for 2.16 branch (incomplete - see comment 8) FYI to anyone watching this bug, the patch for the 2.16 branch on this bug is broken/incomplete. There is a corrective patch on bug 225474.
Attachment #132158 - Attachment description: Patch for 2.16 branch → Patch for 2.16 branch (incomplete - see comment 8)
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: