Closed Bug 255663 Opened 20 years ago Closed 20 years ago

Query on [Bug creation] and anything to do with attachments crashes

Categories

(Bugzilla :: Query/Bug List, defect)

2.19
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: justdave, Assigned: justdave)

Details

(Keywords: regression)

Attachments

(1 file)

<h1>Software error:</h1>
<pre>DBD::mysql::st execute failed: Column: 'creation_ts' in where clause is
ambiguous [for statement ``SELECT bugs.bug_id, bugs.bug_severity, bugs.priority,
bugs.bug_status, bugs.resolution, bugs.delta_ts, bugs.bug_severity,
bugs.priority, map_assigned_to.login_name, bugs.bug_status, bugs.resolution,
map_components.name, bugs.target_milestone, bugs.status_whiteboard,
bugs.short_desc FROM bugs, profiles AS map_assigned_to, components AS
map_components, attachments attachments_0 LEFT JOIN bug_group_map  ON
bug_group_map.bug_id = bugs.bug_id  AND bug_group_map.group_id NOT IN
(9,5,10,3,2,1,11,4,14,16,13,12,6,8,7)  LEFT JOIN cc ON cc.bug_id = bugs.bug_id
AND cc.who = 10297 WHERE bugs.assigned_to = map_assigned_to.userid AND
bugs.component_id = map_components.id AND ((creation_ts &gt;= '2003-01-01
00:00:00')) AND bugs.bug_id = attachments_0.bug_id AND (bugs.product_id IN (21))
AND (bugs.resolution IN ('FIXED')) AND (attachments_0.ispatch = '1') AND
((bug_group_map.group_id IS NULL)    OR (bugs.reporter_accessible = 1 AND
bugs.reporter = 10297)     OR (bugs.cclist_accessible = 1 AND cc.who IS NOT
NULL)     OR (bugs.assigned_to = 10297) OR (bugs.qa_contact = 10297) ) GROUP BY
bugs.bug_id ORDER BY bugs.bug_status, bugs.priority, map_assigned_to.login_name,
bugs.bug_id '']) at Bugzilla/DB.pm line 66
	Bugzilla::DB::SendSQL('SELECT bugs.bug_id, bugs.bug_severity, bugs.priority,
bugs.bug_s...') called at /opt/webtools/bugzilla/buglist.cgi line 695
</pre>
The problem is that the bugs table and the attachments table both have a
creation_ts field, and the changed before/changed after stuff for [Bug created]
doesn't specify the bugs table.  Patch coming up.
Attached patch Patch v1Splinter Review
Attachment #156137 - Flags: review?(bugreport)
Patch applies cleanly to tip and to 2.18 branch (and to 2.17.6 for that matter -
I've already applied it to b.m.o because Asa needed to run this query ;)

2.16 does not have this problem.  This is a regression caused by the checkin
from bug 37749, which was first included in 2.17.5.
Whiteboard: [applied to b.m.o]
Target Milestone: --- → Bugzilla 2.18
Keywords: regression
Flags: blocking2.18+
Comment on attachment 156137 [details] [diff] [review]
Patch v1

r=joel
Attachment #156137 - Flags: review?(bugreport) → review+
Flags: approval?
Flags: approval2.18?
Flags: approval?
Flags: approval2.18?
Flags: approval2.18+
Flags: approval+
Whiteboard: [applied to b.m.o] → patch awaiting checkin, [applied to b.m.o]
Checking in Bugzilla/Search.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search.pm,v  <--  Search.pm
new revision: 1.68; previous revision: 1.67
done
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: patch awaiting checkin, [applied to b.m.o] → [applied to b.m.o]
2.18 branch:

Checking in Bugzilla/Search.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search.pm,v  <--  Search.pm
new revision: 1.57.2.4; previous revision: 1.57.2.3
done
Whiteboard: [applied to b.m.o]
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: