Closed Bug 57819 Opened 24 years ago Closed 23 years ago

cut down large mysql error strings

Categories

(Bugzilla :: Bugzilla-General, defect, P3)

defect

Tracking

()

RESOLVED FIXED
Bugzilla 2.16

People

(Reporter: n_hibma, Assigned: n_hibma)

References

()

Details

(Whiteboard: [error])

Attachments

(2 files)

If msql reports a problem, the resulting strings can be large. Example, 
submitting a 10Mb file as an attachment (which fails) shows up with a missing
quote error. This takes aaaaaages to download.

Patch attached. Against todays bugzilla.

The patch takes out the middle bit and leaves the beginning and end of the 
error message in tact.
Whiteboard: 2.14
Keywords: patch
Whiteboard: 2.14 → 2.16
moving to real milestones...
Target Milestone: --- → Bugzilla 2.16
The URL for the patch is wrong (patch for bug 57818).
Updating to what I guess is the right URL.
-> Bugzilla product, General component (error reporting issue, globals.pl),
reassigning.
Assignee: tara → justdave
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
Whiteboard: 2.16 → [error]
Version: other → unspecified
Comment on attachment 26537 [details] [diff] [review]
the mentioned patch, just in case ...

r=Gerv.

Gerv
Attachment #26537 - Flags: review+
Setting owner to patch writer...
Assignee: justdave → n_hibma
/cvsroot/mozilla/webtools/bugzilla/globals.pl,v  <--  globals.pl
new revision: 1.115; previous revision: 1.114

Gerv
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
I don't want this.  Please back it out.

I know the big strings are a waste to the users, but there have been cases in
the past where we only solved a bug because we had the whole string to look at.

How about we compromise and extract the actual error message out and display
that first (instead of last, at the end of the sql garbage), then put "the
complete error message was: " and the original message or something.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Hmm...  I see the original report was because of error messages on attachments...

How about if we keep a bigger chunk of it?  I agree we wouldn't want the whole
darn attachment repeated back in the error...

But we should probably keep 1K or 2K or so off each end...  (much more than 100
characters at least...)
> I don't want this.  Please back it out.

Could we expand to, say, 5000 characters? That'll exclude the file upload
problem the reporter mentions, but include any sane SQL query string.

Or we could do your idea; but having never seen one of these errors, I'm not
sure how to do the matching.

Gerv
Is the important info at the beginning, or the end, or both?

Gerv
the important info is usually right at the end...

here's a quickly-hacked example:

SELECT blah, bugs.bug_id, bugs.groupset, substring(bugs.bug_severity, 1, 3),
substring(bugs.priority, 1, 3), substring(bugs.rep_platform, 1, 3),
map_assigned_to.login_name, substring(bugs.bug_status,1,4),
substring(bugs.resolution,1,4), substring(bugs.short_desc, 1, 60) FROM bugs,
profiles map_assigned_to, profiles map_reporter LEFT JOIN profiles
map_qa_contact ON bugs.qa_contact = map_qa_contact.userid WHERE bugs.assigned_to
= map_assigned_to.userid AND bugs.reporter = map_reporter.userid AND
bugs.groupset & 0 = bugs.groupset AND (bugs.bug_status = 'NEW' OR
bugs.bug_status = 'ASSIGNED' OR bugs.bug_status = 'REOPENED') GROUP BY
bugs.bug_id ORDER BY bugs.priority, bugs.bug_severity: Unknown column 'blah' in
'field list' at globals.pl line 219.
OK, let's go for 2k at the beginning, 2k at the end, and see if we encounter
problems. Patch coming up.

Gerv
Comment on attachment 53441 [details] [diff] [review]
Patch to upgrade to 2000 chars at front and back

I'll go for that.

r= justdave
Attachment #53441 - Flags: review+
Checked in. This is too trivial to bother anyone else with.

/cvsroot/mozilla/webtools/bugzilla/globals.pl,v  <--  globals.pl
new revision: 1.119; previous revision: 1.118

Gerv
Status: REOPENED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
heh.  agreed.  Thanks!
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

Creator:
Created:
Updated:
Size: