Closed Bug 299230 Opened 20 years ago Closed 19 years ago

Schema-Modification Functions Shouldn't Die on A DB-side Deletion Failure

Categories

(Bugzilla :: Database, defect)

2.19.3
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: mkanat, Assigned: mkanat)

Details

Attachments

(1 file)

Right now, when checksetup tries to "drop" anything that isn't actually in the
DB, it gets an error and dies.

Instead, it should just accept this error and carry on with its life.

Basically, this means that the "do" statements for a bz_drop function should be
inside an eval block. The error should still be printed, but we should delete
the object from the Schema anyhow.
I think there's a good enough chance of this causing a significant support issue
that it should go either into 2.20 or 2.20.1.
Target Milestone: --- → Bugzilla 2.20
Flags: blocking2.20?
Status: NEW → ASSIGNED
OK, here it is. We still print a warning to the user that we couldn't do
something, but we are otherwise very "nice" about SQL failures during deletion.
Attachment #188884 - Flags: review?(wurblzap)
Honestly, I wouldn't block the release on this (it could wait for 2.20.1), but I
think we'll get it in anyway.
Flags: blocking2.20? → blocking2.20-
Attachment #188884 - Flags: review?(wurblzap) → review?(bugzilla)
What other reasons, besides a local customization having removed the item in
question already, are there for one of the statements to fail?
(In reply to comment #4)
> What other reasons, besides a local customization having removed the item in
> question already, are there for one of the statements to fail?

  No other reason. However, we should be at least somewhat nice to local
customizations, because it's nearly impossible for people to locally modify the
stored Schema object, right now.
Attachment #188884 - Flags: review?(bugzilla) → review?(wurblzap)
Comment on attachment 188884 [details] [diff] [review]
Make deletion "nice"

Hm. This seems to work, but I'm not entirely sure that this is really what we
want to do. I can't put my finger on it, though. Please ask somebody else for
review :)
Attachment #188884 - Flags: review?(wurblzap) → review?
Comment on attachment 188884 [details] [diff] [review]
Make deletion "nice"

I am really sure that this is what we want to do.

If we go to *delete* something, and we find it's already *not there*, then we
shouldn't care.

The only time we could run into trouble is if the SQL hits some error other
than the non-existence of the field. But that's pretty rare. (Much rarer than
the problem I'm trying to fix.)
Attachment #188884 - Flags: review? → review?(bugreport)
Comment on attachment 188884 [details] [diff] [review]
Make deletion "nice"

r=joel if you've tested it.
Attachment #188884 - Flags: review?(bugreport) → review+
Flags: approval?
Flags: approval?
Flags: approval2.20+
Flags: approval+
I have tested it.
Tip:

Checking in Bugzilla/DB.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB.pm,v  <--  DB.pm
new revision: 1.65; previous revision: 1.64
done

2.20:

Checking in Bugzilla/DB.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB.pm,v  <--  DB.pm
new revision: 1.56.2.3; previous revision: 1.56.2.2
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: