Closed
Bug 245158
Opened 21 years ago
Closed 20 years ago
Search.pm fails if multiple LEFT JOINs are on the same table in the same chart
Categories
(Bugzilla :: Query/Bug List, defect, P2)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: bugreport, Assigned: bugreport)
References
Details
Attachments
(1 file, 3 obsolete files)
1.82 KB,
patch
|
zach
:
review+
justdave
:
review+
|
Details | Diff | Splinter Review |
If, in a single chart, I try to search for "CC" "contains" "justdave" AND "CC" "contains" "@bugzilla.org" the resulting query will fail because it tries to do 2 distinct LEFT JOIN operations on the same table with the same alias. In order for this to work properly (see bug 237107), Search.pm must do a single LEFT JOIN for each such case and merge the ON criteria.
Assignee | ||
Comment 1•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → Bugzilla 2.18
Assignee | ||
Updated•21 years ago
|
Attachment #149679 -
Flags: review?
Assignee | ||
Comment 2•21 years ago
|
||
Attachment #149679 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #149683 -
Flags: review?
Assignee | ||
Updated•21 years ago
|
Attachment #149679 -
Flags: review?
Assignee | ||
Updated•21 years ago
|
Attachment #149683 -
Flags: review?
Assignee | ||
Comment 3•21 years ago
|
||
Attachment #149683 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #149685 -
Flags: review?
Assignee | ||
Updated•21 years ago
|
Flags: blocking2.18?
Assignee | ||
Comment 4•21 years ago
|
||
Comment on attachment 149685 [details] [diff] [review] v3 - makes sure that ON clauses are in parentheses before ANDing them grr... justdave is right
Attachment #149685 -
Attachment is obsolete: true
Attachment #149685 -
Flags: review?
Assignee | ||
Comment 5•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Attachment #151257 -
Flags: review?(justdave)
Assignee | ||
Updated•21 years ago
|
Attachment #151257 -
Flags: review?(dkl)
Comment 6•21 years ago
|
||
Yeah, this looks pretty straightforward, but something about it just makes me want to wait until we branch to check it in.... (blocking2.18-)
Flags: blocking2.18? → blocking2.18-
Target Milestone: Bugzilla 2.18 → Bugzilla 2.20
Comment 7•21 years ago
|
||
Comment on attachment 151257 [details] [diff] [review] revised - append conditons to correct JOIN r=zach
Attachment #151257 -
Flags: review?(justdave) → review+
Assignee | ||
Updated•21 years ago
|
Flags: approval?
Updated•21 years ago
|
Attachment #151257 -
Flags: review?(dkl)
Updated•21 years ago
|
Flags: approval? → approval+
Assignee | ||
Comment 8•21 years ago
|
||
Checking in Bugzilla/Search.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search.pm,v <-- Search.pm new revision: 1.58; previous revision: 1.57 done
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 9•21 years ago
|
||
IS this valid? You can left join to yourself, perfectly validly.
Assignee | ||
Comment 10•21 years ago
|
||
Yes, this is valid. The reason it fails is the same table alias is used. When we are in the same chart, we DO want to combine all the conditions on the same left join rather than creating a new alias.
Assignee | ||
Comment 11•21 years ago
|
||
Actually, I didn't answer that very completely... The fix combines the JOINs only if they use the identical table alias. So, there are lots of cases where we want to join the same table several times and those are untouched. This only combines the joins when we used the same alias (previously an error condition) because we meant to do that.
Comment 12•20 years ago
|
||
Let's go ahead and put this on the 2.18 branch. It's been tested enough now that I trust it on the branch, and it's a useful fix.
Comment 13•20 years ago
|
||
Requesting approval for 2.18 checkin (patch applies cleanly)
Status: RESOLVED → REOPENED
Flags: approval2.18?
Resolution: FIXED → ---
Updated•20 years ago
|
Flags: approval2.18? → approval2.18+
Target Milestone: Bugzilla 2.20 → Bugzilla 2.18
Comment 14•20 years ago
|
||
*** Bug 275408 has been marked as a duplicate of this bug. ***
Comment 15•20 years ago
|
||
Joel: can you check this in for 2.18? It's pretty critical for that release :-)
Status: REOPENED → ASSIGNED
Assignee | ||
Comment 16•20 years ago
|
||
Checked in on 2.18 branch Checking in Bugzilla/Search.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search.pm,v <-- Search.pm new revision: 1.57.2.7; previous revision: 1.57.2.6 done
Status: ASSIGNED → RESOLVED
Closed: 21 years ago → 20 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•