Closed
Bug 296039
Opened 20 years ago
Closed 20 years ago
[PostgreSQL] Cannot create a new product
Categories
(Bugzilla :: Database, defect, P1)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: werner, Assigned: mkanat)
References
Details
Attachments
(1 file)
1.53 KB,
patch
|
Wurblzap
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
I have configured Bugzilla 2.19.3 with PostgreSQL backend, and when I try to add
a new product a simple SQL-failure hits me:
Adding new product
Software error:
DBD::Pg::st execute failed: ERROR: null value in column "sortkey" violates
not-null constraint
[for Statement "INSERT INTO milestones (product_id, value) VALUES (5, '---')"]
at Bugzilla/DB.pm line 80
Bugzilla::DB::SendSQL('INSERT INTO milestones (product_id, value) VALUES (5,
\'---\')') called at editproducts.cgi line 511
Reproducible: Always
Steps to Reproduce:
1. Setup Bugzilla 2.19.3 with PostgreSQL-backend
2. Login as admin
3. Add new product (default-values except name and description)
Actual Results:
Adding new product
Software error:
DBD::Pg::st execute failed: ERROR: null value in column "sortkey" violates
not-null constraint
[for Statement "INSERT INTO milestones (product_id, value) VALUES (5, '---')"]
at Bugzilla/DB.pm line 80
Bugzilla::DB::SendSQL('INSERT INTO milestones (product_id, value) VALUES (5,
\'---\')') called at editproducts.cgi line 511
Expected Results:
new product added and a confirmation is printed
editproducts.cgi
Reporter | ||
Updated•20 years ago
|
Blocks: bz-postgres
Version: unspecified → 2.19.3
Comment 1•20 years ago
|
||
mkanat, our Pg guru, can you reproduce?
Assignee | ||
Comment 2•20 years ago
|
||
Yep. It's a pretty easy fix. We just either need to add a DEFAULT statement to
that field (which is probably what I'll do) or add it to the INSERT statement.
Severity: normal → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Summary: SQL-fault when adding new product (PostgreSQL) → Cannot create a new product on PostgreSQL
Target Milestone: --- → Bugzilla 2.20
Assignee | ||
Updated•20 years ago
|
Assignee: administration → mkanat
Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P1
Summary: Cannot create a new product on PostgreSQL → [PostgreSQL] Cannot create a new product
Assignee | ||
Comment 3•20 years ago
|
||
This is a really simple patch. All the other "sortkey" fields have a DEFAULT of
0 in the database, except milestone.sortkey. So now I've added that DB default.
Attachment #185912 -
Flags: review?(wurblzap)
Comment 4•20 years ago
|
||
*** Bug 297608 has been marked as a duplicate of this bug. ***
Updated•20 years ago
|
Flags: blocking2.20?
Updated•20 years ago
|
Attachment #185912 -
Flags: review?(wurblzap) → review+
Comment 5•20 years ago
|
||
r=wurblzap by inspection.
I think this qualifies as a low-risk polish patch; requesting approval for 2.20
checkin.
Flags: approval?
Assignee | ||
Comment 7•20 years ago
|
||
Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v <-- checksetup.pl
new revision: 1.407; previous revision: 1.406
done
Checking in Bugzilla/DB/Schema.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Schema.pm,v <-- Schema.pm
new revision: 1.31; previous revision: 1.30
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•