X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FCursor.pm;h=f6d8816a715cd26123f1967781306f51cf0f1949;hb=4ee96719dd1665ef3694aa983cc9046b53e8cc5d;hp=3af3c1bffbd427a4636215c7a00d225dd4ed6c67;hpb=f1e4e2c83b33a2c6280073ced388a91742a3bb46;p=freeside.git diff --git a/FS/FS/Cursor.pm b/FS/FS/Cursor.pm index 3af3c1bff..f6d8816a7 100644 --- a/FS/FS/Cursor.pm +++ b/FS/FS/Cursor.pm @@ -77,13 +77,13 @@ sub new { } $sth->execute or die $sth->errstr; - # in mysql, make sure we're not holding any locks on the tables mentioned - # in the query; in Pg this will do nothing. - $dbh->commit; if ( driver_name() eq 'Pg' ) { $self->{fetch} = $dbh->prepare("FETCH FORWARD $buffer FROM ".$self->{id}); } elsif ( driver_name() eq 'mysql' ) { + # make sure we're not holding any locks on the tables mentioned + # in the query + $dbh->commit if driver_name() eq 'mysql'; $self->{fetch} = $dbh->prepare("SELECT * FROM $self->{id} ORDER BY rownum LIMIT ?, $buffer"); }