summaryrefslogtreecommitdiffstats
path: root/lib/private/db/connection.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-09-10 13:11:04 +0200
committerRobin Appelman <icewind@owncloud.com>2014-10-22 12:26:43 +0200
commitd4e929c37a70291e33c9a686e6e5576bd2a3dd86 (patch)
tree80d628f8f3bd231bd0dcefd1b71529f28311f9e0 /lib/private/db/connection.php
parent97a6f5c46b508cca2c6b55c062945fee5da7f834 (diff)
downloadnextcloud-server-d4e929c37a70291e33c9a686e6e5576bd2a3dd86.tar.gz
nextcloud-server-d4e929c37a70291e33c9a686e6e5576bd2a3dd86.zip
Remove implicit prepared statement cache and get the connection from the server container in \OC_DB
Diffstat (limited to 'lib/private/db/connection.php')
-rw-r--r--lib/private/db/connection.php16
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/private/db/connection.php b/lib/private/db/connection.php
index f91175511b0..a6cdf858899 100644
--- a/lib/private/db/connection.php
+++ b/lib/private/db/connection.php
@@ -25,13 +25,6 @@ class Connection extends \Doctrine\DBAL\Connection implements IDBConnection {
protected $adapter;
/**
- * @var \Doctrine\DBAL\Driver\Statement[] $preparedQueries
- */
- protected $preparedQueries = array();
-
- protected $cachingQueryStatementEnabled = true;
-
- /**
* Initializes a new instance of the Connection class.
*
* @param array $params The connection parameters.
@@ -70,9 +63,6 @@ class Connection extends \Doctrine\DBAL\Connection implements IDBConnection {
$platform = $this->getDatabasePlatform();
$statement = $platform->modifyLimitQuery($statement, $limit, $offset);
} else {
- if (isset($this->preparedQueries[$statement]) && $this->cachingQueryStatementEnabled) {
- return $this->preparedQueries[$statement];
- }
$origStatement = $statement;
}
$statement = $this->replaceTablePrefix($statement);
@@ -81,11 +71,7 @@ class Connection extends \Doctrine\DBAL\Connection implements IDBConnection {
if(\OC_Config::getValue( 'log_query', false)) {
\OC_Log::write('core', 'DB prepare : '.$statement, \OC_Log::DEBUG);
}
- $result = parent::prepare($statement);
- if (is_null($limit) && $this->cachingQueryStatementEnabled) {
- $this->preparedQueries[$origStatement] = $result;
- }
- return $result;
+ return parent::prepare($statement);
}
/**