Closed
Bug 374016
Opened 18 years ago
Closed 18 years ago
Use transactions to create bugs
Categories
(Bugzilla :: Database, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.2
People
(Reporter: mkanat, Assigned: mkanat)
References
Details
Attachments
(1 file, 1 obsolete file)
1.61 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
This is a lot easier than for process_bug.cgi.
We need the transactions to happen inside of Bugzilla::Bug (for things like XML-RPC) and also in post_bug (for normal web bug-entry).
Assignee | ||
Comment 1•18 years ago
|
||
Okay. I've tested this, it seems to work just fine.
I actually don't think we even really need to lock longdescs--what possible race condition could occur on that table there (other than having a rollback and leaving a comment in the table with an invalid bug ID).
$dbh->bz_unlock_tables();
+ $dbh->bz_commit_transaction();
shouldn't bz_unlock_tables be nuked?
Assignee | ||
Comment 3•18 years ago
|
||
Okay, I thought about this some more, and I think what's most important right now is to avoid the "orphan comment" if something causes us to rollback.
So I'm not using transactions in post_bug.cgi, and we'll just have to work on Bug::create supporting attachments and so on.
Attachment #258627 -
Attachment is obsolete: true
Attachment #258628 -
Flags: review?(LpSolit)
Attachment #258627 -
Flags: review?(LpSolit)
Assignee | ||
Comment 4•18 years ago
|
||
(In reply to comment #2)
> $dbh->bz_unlock_tables();
> + $dbh->bz_commit_transaction();
>
> shouldn't bz_unlock_tables be nuked?
In that version of the patch I was still locking longdescs, and committing may implicitly unlock tables in MySQL, but it doesn't unlock them as far as Bugzilla knows.
Comment 5•18 years ago
|
||
Comment on attachment 258628 [details] [diff] [review]
v2
Works fine on both MySQL 5.0.24 and Pg 8.1.8. r=LpSolit
Attachment #258628 -
Flags: review?(LpSolit) → review+
Updated•18 years ago
|
Flags: approval+
Assignee | ||
Comment 6•18 years ago
|
||
Checking in Bugzilla/Bug.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm
new revision: 1.176; previous revision: 1.175
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•