Bug 111606

Summary: editflagtypes.cgi: updating a flag has SQL that doesn't work on PgSQL
Product: [Community] Bugzilla Reporter: Maxwell Kanat-Alexander <mkanat>
Component: Bugzilla GeneralAssignee: PnT DevOps Devs <hss-ied-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-11-04 21:43:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Change comma to INNER JOIN none

Description Maxwell Kanat-Alexander 2003-12-06 03:05:41 UTC
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.

-M

Comment 1 David Lawrence 2003-12-06 18:36:40 UTC
Could you submit a patch please to this report?

Comment 2 Maxwell Kanat-Alexander 2003-12-10 18:10:52 UTC
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.

-M

Comment 3 Maxwell Kanat-Alexander 2003-12-29 21:53:47 UTC
Note that this is also a general Mozilla Bugzilla issue:
<http://bugzilla.mozilla.org/show_bug.cgi?id=228917>

-M

Comment 4 David Lawrence 2006-04-08 17:51:15 UTC
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 16:50:35 UTC
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.