Closed Bug 248001 Opened 20 years ago Closed 20 years ago

Conversion of boolean conditions in SQL statements for better db independence

Categories

(Bugzilla :: Bugzilla-General, defect, P3)

2.17.7
defect

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: dkl, Assigned: dkl)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Even though alot have been eliminated, a few instances of having boolean conditions in SQL statements exist. I have created a patch to convert these to equality tests instead for better database independence. For example: SendSQL(" SELECT DISTINCT groups.id, name, description, isactive FROM groups, user_group_map - WHERE user_id = $userid AND NOT isbless + WHERE user_id = $userid AND isbless = 0 AND user_group_map.group_id = groups.id - AND isbuggroup + AND isbuggroup = 1 ORDER BY description "); I am also making this report a blocker on the PostgresSQL support bug.
Blocks: bz-postgres
That's so simple and obviously correct, I think we should just ask for review on it right now and get it checked in. I'll bet bbaetz could do it; he's usually interested in things that block PgSQL. :-)
Comment on attachment 151391 [details] [diff] [review] Boolean conversion patch for better db independence r=joel
Attachment #151391 - Flags: review+
Priority: -- → P3
Target Milestone: --- → Bugzilla 2.20
Assignee: justdave → dkl
Flags: approval?
OS: Linux → All
Hardware: PC → All
Target Milestone: Bugzilla 2.20 → Bugzilla 2.18
Blocks: bz-oracle
Blocks: bz-sybase
Flags: approval? → approval+
dkl: are you checking this in? I could do it for you if you don't have the time, just let me know. Thanks!
Status: NEW → ASSIGNED
Sure. Be my guest. Been swamped here this week with updates. Also am not sure if I can checkin anymore yet since I have yet to send Myk my public key for CVS access. I need to get on that. Dave
Checking in buglist.cgi; /cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v <-- buglist.cgi new revision: 1.253; previous revision: 1.252 done Checking in editgroups.cgi; /cvsroot/mozilla/webtools/bugzilla/editgroups.cgi,v <-- editgroups.cgi new revision: 1.37; previous revision: 1.36 done Checking in request.cgi; /cvsroot/mozilla/webtools/bugzilla/request.cgi,v <-- request.cgi new revision: 1.13; previous revision: 1.12 done Checking in Bugzilla/Bug.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm new revision: 1.36; previous revision: 1.35 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Attached patch Aditional patch (obsolete) — Splinter Review
Oooops, missed one :-).
I can't reopen this one, so someone else please...
Thomas, -- open another bug. If re reopened this one, it would be impossible to tell whicj patch had approval, etc...
Attachment #152673 - Attachment is obsolete: true
Comment on attachment 152673 [details] [diff] [review] Aditional patch Moved to bug 250832
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: