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

RESOLVED FIXED in Bugzilla 2.20

Status

()

Bugzilla
Bugzilla-General
P1
normal
RESOLVED FIXED
14 years ago
13 years ago

People

(Reporter: justdave, Assigned: Max Kanat-Alexander)

Tracking

({regression})

2.19.2
Bugzilla 2.20
regression
Bug Flags:
approval +

Details

Attachments

(1 attachment)

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
(Assignee)

Comment 2

14 years ago
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
(Assignee)

Comment 3

14 years ago
Created attachment 177277 [details] [diff] [review]
Put the older changes inside a check for a newer change

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.
(Assignee)

Updated

14 years ago
Attachment #177277 - Flags: review?(justdave)
(Assignee)

Updated

14 years ago
Status: NEW → ASSIGNED
Attachment #177277 - Flags: review?(justdave) → review+
Flags: approval+
(Assignee)

Comment 4

14 years ago
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
Last Resolved: 14 years ago
Resolution: --- → FIXED

Comment 5

13 years ago
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.