]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
ROLLBACK which may or may not be useful
authorMikael Nordfeldth <mmn@hethane.se>
Sun, 8 Feb 2015 10:09:19 +0000 (11:09 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sun, 8 Feb 2015 10:09:19 +0000 (11:09 +0100)
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

index c365c560c233be58add270b3f98292414dd55392..a32c35395eb91ba004f48d43b828110195d54159 100644 (file)
@@ -383,6 +383,7 @@ function common_rememberme($user=null)
 
     if (!$result) {
         common_log_db_error($rm, 'INSERT', __FILE__);
+        $rm->query('ROLLBACK');
         return false;
     }