Closed Bug 287138 Opened 20 years ago Closed 20 years ago

INSERT IGNORE is not ANSI SQL

Categories

(Bugzilla :: Bugzilla-General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: Tomas.Kopal, Assigned: Tomas.Kopal)

References

Details

Attachments

(1 file, 1 obsolete file)

editgroups.cgi uses INSERT IGNORE to rederive user permissions from regexps. INSERT IGNORE is not ANSI SQL and Postgres bails out on it. Note: There is one more occurence in checksetup.pl, but since it's in the MySQL specific upgrade code which will never be used on any other DB than MySQL, we don't need to bother.
Yeah, it probably just needs to be changed to a SELECT/INSERT pair. That's what I did with another INSERT IGNORE in checksetup.
Attached patch V1 (obsolete) (deleted) — Splinter Review
Attachment #178181 - Flags: review?(mkanat)
Status: NEW → ASSIGNED
Target Milestone: --- → Bugzilla 2.20
Comment on attachment 178181 [details] [diff] [review] V1 OK, this looks generally correct. That @present should really just be a $present, and you can use selectrow_array with the $sth, like $dbh->selectrow_array($sth, ...); It seems like there ought to be some way to re-write this whole block with something that uses the DB's regex operator... ah well.
Attachment #178181 - Flags: review?(mkanat) → review+
Attached patch V1.1 (deleted) — Splinter Review
Incorporated comments.
Attachment #178181 - Attachment is obsolete: true
Attachment #178196 - Flags: review?(mkanat)
Attachment #178196 - Flags: review?(mkanat) → review+
Flags: approval?
Flags: blocking2.20?
Flags: blocking2.20?
Flags: blocking2.20+
Flags: approval?
Flags: approval+
Checking in editgroups.cgi; /cvsroot/mozilla/webtools/bugzilla/editgroups.cgi,v <-- editgroups.cgi new revision: 1.51; previous revision: 1.50 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: