Closed Bug 277504 Opened 20 years ago Closed 20 years ago

quips migrated from quip file have an (invalid) userid of 0

Categories

(Bugzilla :: Bugzilla-General, defect)

2.19.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: mkanat, Assigned: LpSolit)

References

Details

Attachments

(1 file, 1 obsolete file)

So, justdave pointed out on IRC that if you migrate quips from the "quips" file
to the DB (that is, you run checksetup and it does that part of an upgrade),
then all the added quips get a userid of 0.

Sanity Check complains about this, and that's because it should. 0 is an invalid
userid.

Instead, the userid should just be NULL, and the quips system should be able to
deal with that.

It's just a minor schema change and then some "fixit" code in checksetup, I think.
I'd like to know how to get the problem ("Bad value 0 found in quips.uderid")
fixed once it's in the database. "Sanitycheck.cgi isn't very useful there.
Some users are complaining on IRC that sanitycheck.cgi complains about quips
when upgrading from 2.16 to 2.18. It's not good! It gives them the impression
that something is wrong with their installation. We should fix this problem
before 2.18.1 and 2.20rc1, IMO.

mkanat, are you going to fix it?
Flags: blocking2.20?
Flags: blocking2.18.1?
LpSolit: If you want to fix it, feel free to take it, and I'll review it.
Attached patch convert '0' -> 'NULL', v1 (obsolete) — Splinter Review
This patch convert all userid = 0 to userid = NULL. sanitycheck.cgi does not
care of 'NULL' values so tests are successful again.
Assignee: mkanat → LpSolit
Status: NEW → ASSIGNED
Attachment #174804 - Flags: review?(mkanat)
Target Milestone: --- → Bugzilla 2.20
Comment on attachment 174804 [details] [diff] [review]
convert '0' -> 'NULL', v1

>-     userid mediumint not null default 0, 
>+     userid mediumint default null, 

   Nit: I think you actually don't need a "default null," you can just leave
that off.

>+    $dbh->do('UPDATE quips SET userid = NULL WHERE userid = 0');

  Print a little message saying you're doing this, so admins know it's getting
fixed.
Attachment #174804 - Flags: review?(mkanat) → review-
Attachment #174804 - Attachment is obsolete: true
Attachment #174907 - Flags: review?(mkanat)
Comment on attachment 174907 [details] [diff] [review]
convert '0' -> 'NULL', v2

OK. But don't add the bug-number comments to the table definitions. That's what
cvs blame is for.

That can be removed on checkin.
Attachment #174907 - Flags: review?(mkanat) → review+
Flags: approval?
Flags: blocking2.20?
Flags: blocking2.18.1?
Flags: approval?
Flags: approval2.18+
Flags: approval+
Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.352; previous revision: 1.351
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
I guess we should do 2.18 as well...

Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.289.2.26; previous revision: 1.289.2.25
done
Target Milestone: Bugzilla 2.20 → Bugzilla 2.18
Blocks: 109474
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: