Closed Bug 285552 Opened 21 years ago Closed 21 years ago

Cannot enter a bug on PostgreSQL

Categories

(Bugzilla :: Bugzilla-General, defect, P1)

2.19.2
defect

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file, 1 obsolete file)

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.)
Attached 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)
Depends on: 285534
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.20
Status: NEW → ASSIGNED
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-
OK, I think that status_whiteboard and keywords should both have a default in the schema.
Depends on: 285690
Depends on: 285692
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 on attachment 177106 [details] [diff] [review] Last remaining fix Can a patch be simpler than this? :-)
Attachment #177106 - Flags: review?(Tomas.Kopal) → review+
Flags: approval?
Flags: approval? → approval+
(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 :-)
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
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: