Cannot enter a bug on PostgreSQL

RESOLVED FIXED in Bugzilla 2.20

Status

()

P1
normal
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: mkanat, Assigned: mkanat)

Tracking

2.19.2
Bugzilla 2.20
Dependency tree / graph
Bug Flags:
approval +

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

14 years ago
The SQL for entering a bug in post_bug.cgi cannot run on PostgreSQL, mostly
because of null-condition failures. (That is, a column is NOT NULL but we don't
insert something into it.)
(Assignee)

Comment 1

14 years ago
Posted patch Fixes for post_bug.cgi (obsolete) — Splinter Review
This doesn't allow me to run post_bug all the way through, but it does allow
the bug to get into the DB.
Attachment #176982 - Flags: review?(Tomas.Kopal)
(Assignee)

Updated

14 years ago
Depends on: 285534
(Assignee)

Updated

14 years ago
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.20
(Assignee)

Updated

14 years ago
Status: NEW → ASSIGNED

Comment 2

14 years ago
Comment on attachment 176982 [details] [diff] [review]
Fixes for post_bug.cgi

>Index: post_bug.cgi
>===================================================================
>RCS file: /cvsroot/mozilla/webtools/bugzilla/post_bug.cgi,v
>retrieving revision 1.105
>diff -u -r1.105 post_bug.cgi
>--- post_bug.cgi	7 Mar 2005 21:34:45 -0000	1.105
>+++ post_bug.cgi	10 Mar 2005 06:57:23 -0000
>@@ -335,7 +335,8 @@
> # Build up SQL string to add bug.
> my $sql = "INSERT INTO bugs " . 
>   "(" . join(",", @used_fields) . ", reporter, creation_ts, delta_ts, " .
>-  "estimated_time, remaining_time, deadline) " .
>+  "estimated_time, remaining_time, deadline" .
>+  ",resolution, status_whiteboard, votes, keywords, lastdiffed) " .
>   "VALUES (";

Hmmm, I am almost sure that at least keywords can be specified in the bug, and
then you would be setting it twice (which I guess results in SQL error). Can we
somehow check if it is specified in the form? (e.g. if (grep (/keywords/,
@used_fields) or something like that?
Or we can add default value to the schema, but that's not so generic (if
someone modifies the enter bug form to specify initial status_whiteboard, we
are screwed again), so only if there is no other way :-).
Attachment #176982 - Flags: review?(Tomas.Kopal) → review-
(Assignee)

Comment 3

14 years ago
OK, I think that status_whiteboard and keywords should both have a default in
the schema.
(Assignee)

Updated

14 years ago
Depends on: 285690
(Assignee)

Updated

14 years ago
Depends on: 285692
(Assignee)

Comment 4

14 years ago
OK, here's the last fix that's not a part of the blockers.
Attachment #176982 - Attachment is obsolete: true
Attachment #177106 - Flags: review?(Tomas.Kopal)

Comment 5

14 years ago
Comment on attachment 177106 [details] [diff] [review]
Last remaining fix

Can a patch be simpler than this? :-)
Attachment #177106 - Flags: review?(Tomas.Kopal) → review+
(Assignee)

Updated

14 years ago
Flags: approval?
Flags: approval? → approval+

Comment 6

14 years ago
(In reply to comment #5)
> Can a patch be simpler than this? :-)

Yes, it can. I don't think anyone's ever going to beat this one:

https://bugzilla.mozilla.org/show_bug.cgi?id=150901#c4

:-)

(Assignee)

Comment 7

14 years ago
Checking in post_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/post_bug.cgi,v  <--  post_bug.cgi
new revision: 1.108; previous revision: 1.107
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.