diff options
Diffstat (limited to 'lib/private/db')
-rw-r--r-- | lib/private/db/connection.php | 16 | ||||
-rw-r--r-- | lib/private/db/connectionfactory.php | 13 |
2 files changed, 1 insertions, 28 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); } /** diff --git a/lib/private/db/connectionfactory.php b/lib/private/db/connectionfactory.php index 589a1c0affd..a5260c1a4c5 100644 --- a/lib/private/db/connectionfactory.php +++ b/lib/private/db/connectionfactory.php @@ -98,19 +98,6 @@ class ConnectionFactory { new \Doctrine\DBAL\Configuration(), $eventManager ); - switch ($normalizedType) { - case 'sqlite3': - // Sqlite doesn't handle query caching and schema changes - // TODO: find a better way to handle this - /** @var $connection \OC\DB\Connection */ - $connection->disableQueryStatementCaching(); - break; - case 'oci': - // oracle seems to have issues with cached statements which have been closed - /** @var $connection \OC\DB\Connection */ - $connection->disableQueryStatementCaching(); - break; - } return $connection; } |