Closed Bug 469793 Opened 17 years ago Closed 17 years ago

[MySQL] In MySQL 5, columns sometimes have defaults that have no defaults in the Schema

Categories

(Bugzilla :: Database, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.4

People

(Reporter: mkanat, Assigned: mkanat)

Details

Attachments

(1 file)

The current checksetup-landfill test is failing with a lot of differences like this: - `grantor_id` mediumint(9) NOT NULL default '0' + `grantor_id` mediumint(9) NOT NULL When you import an old DB into MySQL 5, some columns contain defaults when they shouldn't--I think this is because old MySQLs always had defaults on columns. We should remove defaults from columns that aren't supposed to have them, on an upgrade.
Attached patch v1Splinter Review
Okay, this fixes it. We remove defaults from columns that shouldn't have them, if we're on MySQL 5 and bugs.assigned_to has a default (which is the oldest column that could have this problem).
Assignee: database → mkanat
Status: NEW → ASSIGNED
Attachment #353191 - Flags: review+
Attachment #353191 - Attachment description: 1 → v1
Okay, tests should pass now. Checking in Bugzilla/DB/Mysql.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Mysql.pm,v <-- Mysql.pm new revision: 1.70; previous revision: 1.69 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: approval+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: