Fixed bug causing transactions to not be started all the time
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 27 Mar 2005 18:06:44 +0000 (18:06 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 27 Mar 2005 18:06:44 +0000 (18:06 +0000)
includes/LoadBalancer.php

index f5fdf61..8c9aa64 100644 (file)
@@ -402,7 +402,8 @@ class LoadBalancer {
        function closeAll() {
                foreach( $this->mConnections as $i => $conn ) {
                        if ( $this->isOpen( $i ) ) {
-                               $conn->close();
+                               // Need to use this syntax because $conn is a copy not a reference
+                               $this->mConnections[$i]->close();
                        }
                }
        }
@@ -410,7 +411,8 @@ class LoadBalancer {
        function commitAll() {
                foreach( $this->mConnections as $i => $conn ) {
                        if ( $this->isOpen( $i ) ) {
-                               $conn->immediateCommit();
+                               // Need to use this syntax because $conn is a copy not a reference
+                               $this->mConnections[$i]->immediateCommit();
                        }
                }
        }