[PostgreSQL] Cannot add a new query for event/whining

RESOLVED FIXED in Bugzilla 2.20

Status

()

P1
normal
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: werner, Assigned: mkanat)

Tracking

2.19.3
Bugzilla 2.20
Dependency tree / graph
Bug Flags:
approval +
approval2.20 +

Details

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
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 query for an event/whining (editwhines.cgi) a simple SQL-failure hits me.


Reproducible: Always

Steps to Reproduce:
1. Setup Bugzilla 2.19.3 with PostgreSQL-backend
2. Login as admin
3. "Edit: Whining"
(4. Add new event)
5. Add a new query

Actual Results:  
Software error:

DBD::Pg::st execute failed: ERROR:  null value in column "title" violates
not-null constraint
 [for Statement "INSERT INTO whine_queries (eventid) VALUES (?)" with
ParamValues: 1='1'] at editwhines.cgi line 173


Expected Results:  
Printed some options for the query.
(Reporter)

Updated

14 years ago
Blocks: 98304
Version: unspecified → 2.19.3

Comment 1

14 years ago
mkanat, our Pg guru, can you reproduce?
(Assignee)

Comment 2

14 years ago
Yeah, we have little NOT NULL violations all over the place, like that. Thanks
for the reports -- catching things like this is really helpful to me, since I
can't test Pg support all day. :-)
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Priority: -- → P1
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.20
(Assignee)

Updated

14 years ago
Assignee: erik → mkanat
Component: Whining → Database
(Assignee)

Updated

14 years ago
Status: NEW → ASSIGNED
Summary: SQL-fault when adding a new query for event/whining (PostgreSQL) → [PostgreSQL] Cannot add a new query for event/whining
(Assignee)

Comment 3

14 years ago
Erik -- I'm looking over the Whine code, and it looks like it's doing something
very strange... inserting an empty record and then updating it in the DB later?
That works on MySQL, but not on any database that actually enforces NOT NULL
constraints.

I either have to give a DEFAULT to all those fields (which I don't really want
to do) or re-architect the editwhines code so that it doesn't need to insert
empty records (which I probably don't want to do, because we're frozen).

Do you have any other ideas?

Comment 4

14 years ago
editwhines.cgi needs some cleanup anyway. I may take a look later (in the next
two weeks).
(Assignee)

Comment 5

14 years ago
OK, I can confirm that this fixes editwhines.cgi. Let's get this in, and we can
pretty much close bug 98304. :-)
Attachment #188887 - Flags: review?(LpSolit)
(Assignee)

Updated

14 years ago
Attachment #188887 - Flags: review?(LpSolit) → review?(wurblzap)

Comment 6

14 years ago
Comment on attachment 188887 [details] [diff] [review]
Fixes Whines on PostgreSQL

Tested on PostgreSQL 8.0.1. Works fine. r=LpSolit
Attachment #188887 - Flags: review?(wurblzap) → review+

Updated

14 years ago
Flags: approval?
Flags: approval2.20?
Flags: approval?
Flags: approval2.20?
Flags: approval2.20+
Flags: approval+
(Assignee)

Updated

14 years ago
Whiteboard: DELAY CHECK-IN until after bug 299848
Depends on: 299848
(Assignee)

Comment 7

14 years ago
2.20:

Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.412.2.7; previous revision: 1.412.2.6
done
Checking in Bugzilla/DB/Schema.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Schema.pm,v  <--  Schema.pm
new revision: 1.32.2.3; previous revision: 1.32.2.2
done

tip:

Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.428; previous revision: 1.427
done
Checking in Bugzilla/DB/Schema.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Schema.pm,v  <--  Schema.pm
new revision: 1.35; previous revision: 1.34
done
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Whiteboard: DELAY CHECK-IN until after bug 299848
(Assignee)

Updated

14 years ago
Blocks: 304997
You need to log in before you can comment on or make changes to this bug.