Bug 111606 - editflagtypes.cgi: updating a flag has SQL that doesn't work on PgSQL
Summary: editflagtypes.cgi: updating a flag has SQL that doesn't work on PgSQL
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Bugzilla General
Version: 3.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: PnT DevOps Devs
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-12-06 03:05 UTC by Maxwell Kanat-Alexander
Modified: 2013-06-24 02:57 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-11-04 21:43:25 UTC
Embargoed:


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

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.


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