@@ -832,13 +832,11 @@ sub create {
832832 stash => $stash ,
833833 });
834834
835- $dbh -> bz_commit_transaction();
836835
837- # Because MySQL doesn't support transactions on the fulltext table,
838- # we do this after we've committed the transaction. That way we're
839- # sure we're inserting a good Bug ID.
840836 $bug -> _sync_fulltext( new_bug => 1 );
841837
838+ $dbh -> bz_commit_transaction();
839+
842840 # BMO - some work should happen outside of the transaction block
843841 Bugzilla::Hook::process(' bug_after_create' , { bug => $bug , timestamp => $timestamp });
844842
@@ -1178,17 +1176,13 @@ sub update {
11781176 delete $user -> {bugs_ignored } if $bug_ignored_changed ;
11791177 }
11801178
1181- $dbh -> bz_commit_transaction();
1182-
1183- # The only problem with this here is that update() is often called
1184- # in the middle of a transaction, and if that transaction is rolled
1185- # back, this change will *not* be rolled back. As we expect rollbacks
1186- # to be extremely rare, that is OK for us.
11871179 $self -> _sync_fulltext(
11881180 update_short_desc => $changes -> {short_desc },
11891181 update_comments => $self -> {added_comments } || $self -> {comment_isprivate }
11901182 );
11911183
1184+ $dbh -> bz_commit_transaction();
1185+
11921186 # Remove obsolete internal variables.
11931187 delete $self -> {' _old_assigned_to' };
11941188 delete $self -> {' _old_qa_contact' };
0 commit comments