web/modules/rhn/RHN/DB.pm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit 507221a13df6862c0b6d306934c9d7a76f58df16
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 6 10:29:40 2010 +0200
Do not reconnect with every sequence_nextval -- the $self should be usable object to
call prepare on.
diff --git a/web/modules/rhn/RHN/DB.pm b/web/modules/rhn/RHN/DB.pm
index 19cef12..9840462 100644
--- a/web/modules/rhn/RHN/DB.pm
+++ b/web/modules/rhn/RHN/DB.pm
@@ -486,8 +486,7 @@ sub sequence_nextval {
my $self = shift;
my $sequence = shift;
- my $dbh = RHN::DB->connect;
- my $sth = $dbh->prepare("SELECT $sequence.nextval FROM DUAL");
+ my $sth = $self->prepare("SELECT $sequence.nextval FROM DUAL");
$sth->execute;
my ($ret) = $sth->fetchrow;
Show replies by date