Index: database.inc
===================================================================
--- database.inc	(revision 2184)
+++ database.inc	(revision 2185)
@@ -1036,7 +1036,15 @@
         if (empty($this->transactionLayers)) {
           break;
         }
-        $this->query('ROLLBACK TO SAVEPOINT ' . $savepoint);
+        try {
+          $this->query('ROLLBACK TO SAVEPOINT ' . $savepoint);
+        } catch (PDOException $e) {
+          if ($e->errorInfo[1] == '1305') {
+            // Save point already has been rollbacked, it seems, so we
+            // logically just should ignore  this and try to invoke for
+            // god forgiveness.
+          } else {
+            throw $e;
+          }
+        }
         $this->popCommittableTransactions();
         if ($rolled_back_other_active_savepoints) {
           throw new DatabaseTransactionOutOfOrderException();
