INSERT IGNORE is not ANSI SQL

RESOLVED FIXED in Bugzilla 2.20

Status

()

RESOLVED FIXED
14 years ago
14 years ago

People

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

Tracking

unspecified
Bugzilla 2.20
Bug Flags:
approval +
blocking2.20 +

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.83 KB, patch
mkanat
: review+
Details | Diff | Splinter Review
(Assignee)

Description

14 years ago
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.
(Assignee)

Comment 2

14 years ago
Posted patch V1 (obsolete) — Splinter Review
Attachment #178181 - Flags: review?(mkanat)
(Assignee)

Updated

14 years ago
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+
(Assignee)

Comment 4

14 years ago
Posted patch V1.1Splinter Review
Incorporated comments.
Attachment #178181 - Attachment is obsolete: true
Attachment #178196 - Flags: review?(mkanat)

Updated

14 years ago
Attachment #178196 - Flags: review?(mkanat) → review+

Updated

14 years ago
Flags: approval?
(Assignee)

Updated

14 years ago
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
Last Resolved: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.