Closed
Bug 179260
Opened 22 years ago
Closed 22 years ago
Unknown table 'map_assigned_to' in order clause at globals.pl line 242
Categories
(Bugzilla :: Query/Bug List, defect, P2)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: paper, Assigned: bugreport)
References
()
Details
Attachments
(2 files, 1 obsolete file)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
bbaetz
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20020618
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20020618
Any bugzilla query will do this
URL:
http://bugzilla.mozilla.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=product&type0-0-0=substring&value0-0-0=test&field0-0-1=component&type0-0-1=substring&value0-0-1=test&field0-0-2=short_desc&type0-0-2=substring&value0-0-2=test&field0-0-3=status_whiteboard&type0-0-3=substring&value0-0-3=test
Cookies:
LASTORDER=bugs.delta_ts%2C%20bugs.bug_status%2C%20bugs.priority%2C%20map_assigned_to.login_name%2C%20bugs.bug_id
COLUMNLIST=opendate changeddate severity priority platform status resolution
component votes target_milestone summaryfull
Doesn't do this in other browsers, so I'm guessing it's cookies.. possibly the
fact I sort by assigned_to, but do not have it in the column list?
Reproducible: Always
Steps to Reproduce:
Assignee | ||
Comment 1•22 years ago
|
||
OK, I'm not usre if this is a regression, but I think I understand what causes it.
If a column was sorted on and then is dropped from the requested column list,
buglist only checks to see if the column exists, not if it is being fetched.
patch follows
Assignee: endico → bugreport
Severity: normal → critical
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Priority: -- → P2
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.18
Version: unspecified → 2.17.1
Assignee | ||
Comment 2•22 years ago
|
||
Reject any columns from sort order if they are not in selectnames.
Causes stale cookie to be deleted.
Assignee | ||
Updated•22 years ago
|
Attachment #105713 -
Flags: review?
Comment 3•22 years ago
|
||
Comment on attachment 105713 [details] [diff] [review]
Patch
Err, why is this type of search incorrect?
The fix is to modify Bugzilla/Search. At the top, it only joins to tables if
they're in the requested columns list (this was changed for perf reasons). It
should also consider the order param. This will mean moving 'order by' support
into the .pm, rather than having the cgi tack it onto the end. ISTM that thats
a sensible thing to do anyway.
Attachment #105713 -
Flags: review? → review-
Reporter | ||
Comment 4•22 years ago
|
||
Here's the SQL and error in case you need it
SELECT bugs.bug_id, bugs.creation_ts, bugs.delta_ts, bugs.bug_severity,
bugs.priority, bugs.rep_platform, bugs.bug_status, bugs.resolution,
map_components.name, bugs.votes, bugs.target_milestone, bugs.short_desc FROM
bugs, components AS map_components, products products_0, components components_0
LEFT JOIN bug_group_map ON bug_group_map.bug_id = bugs.bug_id AND
bug_group_map.group_id NOT IN (9) LEFT JOIN cc ON cc.bug_id = bugs.bug_id AND
cc.who = 38080 WHERE bugs.component_id = map_components.id AND bugs.product_id
= products_0.id AND bugs.component_id = components_0.id AND (bugs.bug_status =
'UNCONFIRMED' OR bugs.bug_status = 'NEW' OR bugs.bug_status = 'ASSIGNED' OR
bugs.bug_status = 'REOPENED') AND (INSTR(LOWER(products_0.name), 'test') OR
INSTR(LOWER(components_0.name), 'test') OR INSTR(LOWER(bugs.short_desc), 'test')
OR INSTR(LOWER(bugs.status_whiteboard), 'test')) AND ((bug_group_map.group_id IS
NULL) OR (bugs.reporter_accessible = 1 AND bugs.reporter = 38080) OR
(bugs.cclist_accessible = 1 AND cc.who IS NOT NULL) OR (bugs.assigned_to =
38080) OR (bugs.qa_contact = 38080) ) GROUP BY bugs.bug_id ORDER BY
bugs.delta_ts, bugs.bug_status, bugs.priority, map_assigned_to.login_name,
bugs.bug_id : Unknown table 'map_assigned_to' in order clause at globals.pl line
242.
Assignee | ||
Comment 5•22 years ago
|
||
bbaetz volunteered to do a more comprehensive patch. Reassigning to him.
Assignee: bugreport → bbaetz
Comment 6•22 years ago
|
||
Actually, I have a bit more work to do this week than I thought, so this may
take me a while to get to
Assignee | ||
Comment 7•22 years ago
|
||
OK, then I'll fix this (still within buglist.cgi) by having it request the
columns it needs before calling Search.
Assignee: bbaetz → bugreport
Assignee | ||
Comment 8•22 years ago
|
||
This is primarily a rearrangment of the existing code in buglist.cgi so that
the order is analyzed before the search is called. The only really new code in
it is the section that adds the columns in the order to the list of columns to
be selected if they are already validated and are not already on the list.
Attachment #105713 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #105746 -
Flags: review?
Comment 9•22 years ago
|
||
Comment on attachment 105746 [details] [diff] [review]
Patch v2
This is an evil, ugly hack. Eitherkeep this bug open, or file a new one
assigned to me for hte proper fix.
r=bbaetz to stop the breakage
Attachment #105746 -
Flags: review? → review+
Comment 10•22 years ago
|
||
a=myk
Assignee | ||
Comment 11•22 years ago
|
||
Checking in buglist.cgi;
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v <-- buglist.cgi
new revision: 1.209; previous revision: 1.208
done
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 13•22 years ago
|
||
I stopped just short of making this a WORKSFORME....
This patch presumes that the earlier patch is still in place and moves the
check until after all the non-cookie-based orders have been added.
Assignee | ||
Updated•22 years ago
|
Attachment #105869 -
Flags: review?(bbaetz)
Comment 14•22 years ago
|
||
Comment on attachment 105869 [details] [diff] [review]
FURTHER patch
This code is so hacky...
Attachment #105869 -
Flags: review?(bbaetz) → review+
Comment 15•22 years ago
|
||
see comment 10
Assignee | ||
Comment 16•22 years ago
|
||
WRT comment 14, I agree. Someone should move this to Search.pm, see bug 179451
Checking in buglist.cgi;
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v <-- buglist.cgi
new revision: 1.210; previous revision: 1.209
done
Status: REOPENED → RESOLVED
Closed: 22 years ago → 22 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
•