Closed Bug 776972 Opened 13 years ago Closed 13 years ago

Increase bugs_activity primary key size to INTSERIAL for future growth

Categories

(Bugzilla :: Database, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
Bugzilla 4.4

People

(Reporter: dkl, Assigned: dkl)

References

Details

Attachments

(1 file, 2 obsolete files)

Currently bugs_activity's primary key is MEDIUMSERIAL which is limited to ~8.3 million rows. Several large Bugzilla installations will hit that limit sooner rather than later so the size needs to be increases to INTSERIAL. Patch attached
Attachment #645360 - Flags: review?(glob)
Comment on attachment 645360 [details] [diff] [review] Patch to increase primary key size of bugs_activity (v1) Already converted DB won't see this change. You must fix them too.
Attachment #645360 - Flags: review?(glob) → review-
dkl: would you agree to fix longdescs at the same time?
Severity: normal → critical
Flags: blocking4.4+
Target Milestone: --- → Bugzilla 4.4
New patch that will update a previous installed primary key as well. As for longdescs, I think we should fix that as well. I will file a separate bug for that. dkl
Attachment #645360 - Attachment is obsolete: true
Attachment #645364 - Flags: review?(LpSolit)
Attachment #645364 - Attachment is patch: true
Comment on attachment 645364 [details] [diff] [review] Patch to increase primary key size of bugs_activity (v2) >=== modified file 'Bugzilla/Install/DB.pm' All you have to do is to write: $dbh->bz_add_column('bugs_activity', 'id', {TYPE => 'INTSERIAL', NOTNULL => 1, PRIMARYKEY => 1}); # Fix installations which had MEDIUMSERIAL instead of INTSERIAL for bugs_activity.id. $dbh->bz_alter_column('bugs_activity', 'id', {TYPE => 'INTSERIAL', NOTNULL => 1, PRIMARYKEY => 1}); Not yet upgraded installations will see bz_add_column() while already upgraded installations will see bz_alter_column(). These two methods already do checks themselves to know if they should be executed or not. This would be cleaner IMO than what your patch proposes (avoids the IF ELSE block).
Yes that is cleaner. Should have thought of that before ;) Here is simpler patch. dkl
Attachment #645364 - Attachment is obsolete: true
Attachment #645364 - Flags: review?(LpSolit)
Attachment #645406 - Flags: review?(LpSolit)
Comment on attachment 645406 [details] [diff] [review] Patch to increase primary key size of bugs_activity (v3) r=LpSolit
Attachment #645406 - Flags: review?(LpSolit) → review+
Flags: approval+
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bugzilla/trunk modified Bugzilla/Install/DB.pm modified Bugzilla/DB/Schema.pm Committed revision 8302
Status: NEW → RESOLVED
Closed: 13 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: