aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-10-08 04:24:46 +0000
committerlpsolit%gmail.com <>2007-10-08 04:24:46 +0000
commitbd370f377168cc55ff33240a16d574bf7982b5a5 (patch)
tree233b677bf1c0a17c7eb0c6b8829ea8c4489a5655 /whine.pl
parentBug 264785: config.rdf needs XML filtering of output to generate valid HTML (... (diff)
downloadbugzilla-bd370f377168cc55ff33240a16d574bf7982b5a5.tar.gz
bugzilla-bd370f377168cc55ff33240a16d574bf7982b5a5.tar.bz2
bugzilla-bd370f377168cc55ff33240a16d574bf7982b5a5.zip
Bug 398707: whine.pl should use transactions for database interaction - Patch by Emmanuel Seyman <eseyman@linagora.com> r/a=mkanat
Diffstat (limited to 'whine.pl')
-rwxr-xr-xwhine.pl9
1 files changed, 2 insertions, 7 deletions
diff --git a/whine.pl b/whine.pl
index 82bfc933b..a809025c0 100755
--- a/whine.pl
+++ b/whine.pl
@@ -206,12 +206,7 @@ sub get_next_event {
# Loop until there's something to return
until (scalar keys %{$event}) {
- $dbh->bz_lock_tables('whine_schedules WRITE',
- 'whine_events READ',
- 'profiles READ',
- 'groups READ',
- 'group_group_map READ',
- 'user_group_map READ');
+ $dbh->bz_start_transaction();
# Get the event ID for the first pending schedule
$sth_next_scheduled_event->execute;
@@ -275,7 +270,7 @@ sub get_next_event {
reset_timer($sid);
}
- $dbh->bz_unlock_tables();
+ $dbh->bz_commit_transaction();
# Only set $event if the user is allowed to do whining
if ($owner->in_group('bz_canusewhines')) {