Right now, because of the way that MySQL treats NOT NULL, bugs.qa_contact is already effectively 'default 0.' The logic to deal with qa_contact is too difficult to always insert a 0 when we need to. So, instead, we'll add a default to it. Very simple.
Heck, we aren't frozen yet. Let's just fix this the right way. It SHOULD be equally as simple, provided that nothing is currently depending on qa_contact being 0. justdave says to do it. :-) By the way, this prevents post_bug from working on PostgreSQL, so it's important.
Status: NEW → ASSIGNED
Priority: -- → P1
Summary: bugs.qa_contact should have a 'default 0' → bugs.qa_contact should allow NULL
Target Milestone: --- → Bugzilla 2.20
Created attachment 176981 [details] [diff] [review] Allow QA Contact to be Null and catch any undef warnings
Created attachment 176984 [details] [diff] [review] v2 I found another place where we'd inserted a 0 to initialqacontact; in checksetup.
Comment on attachment 176984 [details] [diff] [review] v2 bitrotten
Attachment #176984 - Flags: review?(bugreport) → review-
Created attachment 177278 [details] [diff] [review] v2.1 Fixed the bitrot.
Checking in checksetup.pl; /cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v <-- checksetup.pl new revision: 1.373; previous revision: 1.372 done Checking in globals.pl; /cvsroot/mozilla/webtools/bugzilla/globals.pl,v <-- globals.pl new revision: 1.317; previous revision: 1.316 done Checking in post_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/post_bug.cgi,v <-- post_bug.cgi new revision: 1.107; previous revision: 1.106 done Checking in process_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.242; previous revision: 1.241 done Checking in sanitycheck.cgi; /cvsroot/mozilla/webtools/bugzilla/sanitycheck.cgi,v <-- sanitycheck.cgi new revision: 1.88; previous revision: 1.87 done Checking in Bugzilla/Bug.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm new revision: 1.68; previous revision: 1.67 done Checking in Bugzilla/User.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/User.pm,v <-- User.pm new revision: 1.47; previous revision: 1.46 done Checking in Bugzilla/DB/Schema.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Schema.pm,v <-- Schema.pm new revision: 1.8; previous revision: 1.7 done
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.