Don't send COMMIT if not in a transaction.
authorAaron <aschulz@wikimedia.org>
Fri, 21 Sep 2012 22:27:10 +0000 (15:27 -0700)
committerAaron <aschulz@wikimedia.org>
Fri, 21 Sep 2012 22:27:10 +0000 (15:27 -0700)
Change-Id: Ifffbf703b15cd875feda1514d3c0d488b8665b66

includes/db/LoadBalancer.php

index df36bf8..d635645 100644 (file)
@@ -921,7 +921,7 @@ class LoadBalancer {
                                continue;
                        }
                        foreach ( $conns2[$masterIndex] as $conn ) {
-                               if ( $conn->doneWrites() ) {
+                               if ( $conn->trxLevel() && $conn->doneWrites() ) {
                                        $conn->commit( __METHOD__ );
                                }
                        }