bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

use a better error on failed DBI->Connect

RESOLVED FIXED in Bugzilla 2.12

Status

()

Bugzilla
Bugzilla-General
--
enhancement
RESOLVED FIXED
18 years ago
6 years ago

People

(Reporter: Alan Shields, Assigned: Tara Hernandez)

Tracking

unspecified
Bugzilla 2.12
x86
Linux

Details

(Whiteboard: 2.12)

Attachments

(4 attachments)

(Reporter)

Description

18 years ago
Report the $DBI::errstr rather than a general failure. Helps during debugging.
(Reporter)

Comment 1

18 years ago
Created attachment 23112 [details] [diff] [review]
proposed patch
(Reporter)

Updated

18 years ago
Keywords: patch

Comment 3

18 years ago
Adding 2.12 as this patch is already reviewed and just needs to be checked in
(it's also low risk, high gain).
Whiteboard: 2.12
checked in.
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
(Assignee)

Updated

18 years ago
Target Milestone: --- → Bugzilla 2.12
(Assignee)

Comment 5

18 years ago
Sorry for the spam, but I needed to be able to query for all of these correctly.
So what sort of error will this now give? 

Every time b.m.o goes down I get at least two emails asking me what the "Cannot 
connect to database server." message means, so it would be good if it is more 
clear.

Gerv
(Reporter)

Comment 7

18 years ago
Gerv, wouldn't you want to be receiving these e-mails? Sure, it's annoying, but
this certainly lets you know when b.m.o. is down.
Why on earth would I want to know when b.m.o is down? I can't do anything about 
it! :-(

Those who can do something no doubt have nice monitoring scripts to tell them. 
Really.

Gerv

Comment 9

18 years ago
When I did a "mysqladmin shutdown" on my local test install, I got the following
error:

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
(2) at globals.pl line 93. 

I suppose that means you'll still get your e-mails  :(
Created attachment 27018 [details] [diff] [review]
Updated patch - more sane error message.
Reopening. Updated patch attached with better error message, to save Gerv's 
sanity.

_Please_ can this go into 2.12? Please? It's one line. And really simple.

Gerv
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Comment 12

18 years ago
yuck! that's too generic. people are still going to report the problem and
they'll have nothing useful to report. When that error occurs it ususally
needs manual intervention. to fix. I prefer the current error message to
your suggestion.

Comment 13

18 years ago
alright. never mind then. i missed the  $DBI::errstr;
Fixed with a nice wording after IRC discussion.

Gerv
Status: REOPENED → RESOLVED
Last Resolved: 18 years ago18 years ago
Resolution: --- → FIXED
Moving closed bugs to Bugzilla product
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
Version: other → unspecified
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.