[freeside-commits] branch FREESIDE_3_BRANCH updated. cfb621c8a224ca9161d9f3c2472c3bfd545ba17f

Mark Wells mark at 420.am
Fri Jun 13 12:48:05 PDT 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  cfb621c8a224ca9161d9f3c2472c3bfd545ba17f (commit)
      from  00f5b1bea57e0183802205b625b1139abb4fe781 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit cfb621c8a224ca9161d9f3c2472c3bfd545ba17f
Author: Mark Wells <mark at freeside.biz>
Date:   Fri Jun 13 12:47:46 2014 -0700

    but don't break Pg cursors in the process, #28895

diff --git a/FS/FS/Cursor.pm b/FS/FS/Cursor.pm
index 3af3c1b..f6d8816 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");
   }
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Cursor.pm |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list