From 4c9a74cb12663e11097d6b05922ec7c172bc7d96 Mon Sep 17 00:00:00 2001
From: Mikael Nordfeldth <mmn@hethane.se>
Date: Sun, 8 Feb 2015 11:09:19 +0100
Subject: [PATCH] ROLLBACK which may or may not be useful

There were problems with queries that were executed but didn't seem to
be committed. Trying to patch that up by calling a ROLLBACK on transactions
where the loading of the page isn't stopped after the BEGIN statement's
intended function fails (like with the rememberme cookie in this commit).
---
 lib/util.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/util.php b/lib/util.php
index c365c560c2..a32c35395e 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -383,6 +383,7 @@ function common_rememberme($user=null)
 
     if (!$result) {
         common_log_db_error($rm, 'INSERT', __FILE__);
+        $rm->query('ROLLBACK');
         return false;
     }
 
-- 
2.39.5