Bug 111606 - editflagtypes.cgi: updating a flag has SQL that doesn't work on PgSQL
editflagtypes.cgi: updating a flag has SQL that doesn't work on PgSQL
Product: Bugzilla
Classification: Community
Component: Bugzilla General (Show other bugs)
All Linux
medium Severity medium (vote)
: ---
: ---
Assigned To: PnT DevOps Devs
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2003-12-05 22:05 EST by Maxwell Kanat-Alexander
Modified: 2013-06-23 22:57 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-11-04 16:43:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Change comma to INNER JOIN (848 bytes, patch)
2003-12-10 13:10 EST, Maxwell Kanat-Alexander
no flags Details | Diff

  None (edit)
Description Maxwell Kanat-Alexander 2003-12-05 22:05:41 EST
There's some SQL in editflagtypes.cgi that's proprietary to MySQL --
it uses a comma in the FROM clause, which in MySQL means INNER JOIN
(according to justdave), and I'm not sure what it means in PostgreSQL,
but it doesn't work right.

Look for "FROM flags, bugs" in the file -- it's around there. 

I fixed it (at least, theoretically) on my installation by changing
the "flags, bugs" to be:

(flags INNER JOIN bugs ON bugs.bug_id = flags.bug_id)

And removing that "bugs.bug_id = flags.bug_id" from the WHERE clause.

Steps to Reproduce:
1. Create a new flag, and hit "Save Changes."
2. Edit the flag, and hit "Save Changes."
Actual results:
SQL Error

Expected results:
Flag is updated.

Comment 1 David Lawrence 2003-12-06 13:36:40 EST
Could you submit a patch please to this report?
Comment 2 Maxwell Kanat-Alexander 2003-12-10 13:10:52 EST
Created attachment 96449 [details]
Change comma to INNER JOIN

This should be the same as what editflagtypes was previously trying to do, and
failing. I noticed that this was done correctly Flag.pm, but with a CROSS JOIN
that is probably unnecessary.

Comment 3 Maxwell Kanat-Alexander 2003-12-29 16:53:47 EST
Note that this is also a general Mozilla Bugzilla issue:

Comment 4 David Lawrence 2006-04-08 13:51:15 EDT
Red Hat's current Bugzilla version is 2.18. I am moving all older open bugs to
this version. Any bugs against the older versions will need to be verified that
they are still bugs. This will help me also to sort them better.
Comment 5 David Lawrence 2008-09-16 12:50:35 EDT
Red Hat Bugzilla is now using version 3.2 of the Bugzilla codebase and therefore this bug will need to be re-verified against the new release. With the updated code this bug may no longer be relevant or may have been fixed in the new code.
Updating bug version to 3.2.

Note You need to log in before you can comment on or make changes to this bug.