Closed Bug 91808 Opened 24 years ago Closed 24 years ago

Sanity check duplicates table.

Categories

(Bugzilla :: Administration, task, P3)

2.13

Tracking

()

RESOLVED FIXED
Bugzilla 2.16

People

(Reporter: CodeMachine, Assigned: CodeMachine)

Details

Attachments

(3 files)

I added a few referential checks for the new duplicates table to a patch on bug #76140. However, we could go further. In particular: Check that each bug that's been marked duplicate has an entry in the duplicates table. Check that each bug that has an entry in the duplicates table that's been marked duplicate. In particular the second check goes further than the existing referential check, so maybe it should be removed from the above mentioned patch. But anyway, rather than doing these two checks separately, I suggest we do them together, in a similar way as a list merge: (1) Get a sorted list of bugs marked duplicate as per the bugs table. (2) Get a sorted list of bugs marked duplicate as per the duplicates table. (3) Compare the two lists using a similar technique as you would to merge the lists into one sorted list - continually compare the heads. If both heads are the same, remove them, otherwise remove the lesser head and split out an error.
Priority: -- → P3
Target Milestone: --- → Bugzilla 2.16
Attached patch Fix.Splinter Review
The above patch has comments in the style of bug #93667.
Keywords: patch, review
I did the patch in two different parts, because I wasn't sure if and how I could do a symmetric outer join, and there doesn't seem to be a way to process two queries at once. It's only sanity check, so it's no biggie.
Moving to new Bugzilla product ...
Assignee: tara → justdave
Component: Bugzilla → Administration
Product: Webtools → Bugzilla
Version: Bugzilla 2.13 → 2.13
Attached patch New version.Splinter Review
Comment on attachment 47992 [details] [diff] [review] New version. OK, this looks good to me. r=jake Suggest a second review.
Attachment #47992 - Flags: review+
-> Patch writer
Assignee: justdave → matty
QA Contact: matty → jake
Comment on attachment 47992 [details] [diff] [review] New version. MattyT said that he would add some stuff in between the declaration of my @badbugs and @badbugs = (); possibly in a different patch. Apart from that minor nit, this patch looks fine, although I haven't tested it. r= caillon.
Attachment #47992 - Flags: review+
checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
MySQL 3.22 doesn't support inner join :(
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Oh grr, now I remember. One to add to the HACKER's guide.
Attached patch Fix.Splinter Review
Added INNER JOIN to bug #97976.
Comment on attachment 48516 [details] [diff] [review] Fix. r= justdave (no 2nd review needed)
Attachment #48516 - Flags: review+
checked in.
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
QA Contact: jake → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: