Closed Bug 285824 Opened 19 years ago Closed 19 years ago

whiteboard, votes, and keywords update in checksetup.pl fails to detect an already-upgraded schema

Categories

(Bugzilla :: Bugzilla-General, defect, P1)

2.19.2
defect

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: justdave, Assigned: mkanat)

Details

(Keywords: regression)

Attachments

(1 file)

landfill has been mailing the following to me once an hour ever since bug 285690
was checked in.

Updating field type status_whiteboard in table bugs ...
old: mediumtext not null
new: mediumtext not null default ''
Updating field type keywords in table bugs ...
old: mediumtext not null
new: mediumtext not null default ''
Updating field type votes in table bugs ...
old: mediumint(9) not null
new: mediumint not null default 0

Apparently whatever "learn about" function it's using to get the existing column
definition isn't telling it about the default values...
Yep, I'm seeing this too on my laptop, every time I run checksetup.pl.

Gerv
Weird. Those functions aren't supposed to do that.

Ah well, there's an easy fix, and I'll do it.
Assignee: general → mkanat
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.20
I moved the older changes inside of a check for a newer change. The
bz_change_field_type function is broken, but I'm not going to fix it, because
I'm going to eliminate it soon.
Attachment #177277 - Flags: review?(justdave)
Status: NEW → ASSIGNED
Attachment #177277 - Flags: review?(justdave) → review+
Flags: approval+
On checkin, I also fixed some spacing in checksetup that had been causing things
to fuzz where they should have been failing. I just deleted two blank lines
below the "END LEGACY CHECKS" line. (Code should be going inside there, not
outside there.)

Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.372; previous revision: 1.371
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
text and blob derived data types do not support default values in mysql (5.0.16-nt)

It kind of works until a backup+restore is done ... which is not a good time to find that your stuffed ... try 'copy sql to clipboard' in query browser ... you'll see that the defaults are stripped for these data types.

this is a fundamental issue in MySQL, it manifests everywhere ... but it allows you to create them and they work initially ... fooling you into thinking its reliable.


You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: