Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-06-11 19:02:34 +0400
committerVincent Petry <pvince81@owncloud.com>2014-07-15 19:04:50 +0400
commit078637130e540a93d59fa9ff6bcad93a1ef70128 (patch)
tree8b9ce0e57ae601142aa00b9fa60c9434d8a06b00 /lib/private/db.php
parent3113e99c904150ce55fa82f9b7d479664ee9daa1 (diff)
- Added test to trigger index id error
- re-enable encryption migration tests - sqlite requires reconnect after schema changes Backport of 10a2955 from master
Diffstat (limited to 'lib/private/db.php')
-rw-r--r--lib/private/db.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/db.php b/lib/private/db.php
index 6aaf31a30cd..221a369cad2 100644
--- a/lib/private/db.php
+++ b/lib/private/db.php
@@ -106,6 +106,16 @@ class OC_DB {
}
/**
+ * The existing database connection is closed and connected again
+ */
+ public static function reconnect() {
+ if(self::$connection) {
+ self::$connection->close();
+ self::$connection->connect();
+ }
+ }
+
+ /**
* @return \OC\DB\Connection
*/
static public function getConnection() {