diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-08-07 18:21:49 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-08-07 18:21:49 +0200 |
commit | 0783267e2ccca0ab3e8dc8143308bd379320ef1e (patch) | |
tree | 0a2b21cc2f19278792fdda621b5c4f0b678f1d86 | |
parent | 2cc94cbc7387a7cd15803c8e3b4d450f05e7b041 (diff) | |
download | nextcloud-server-0783267e2ccca0ab3e8dc8143308bd379320ef1e.tar.gz nextcloud-server-0783267e2ccca0ab3e8dc8143308bd379320ef1e.zip |
Move query processing after the check for prepared statement cache
-rw-r--r-- | lib/db/connection.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/db/connection.php b/lib/db/connection.php index 7f207ff76ec..24466d7bddd 100644 --- a/lib/db/connection.php +++ b/lib/db/connection.php @@ -62,9 +62,6 @@ class Connection extends \Doctrine\DBAL\Connection { * @return \Doctrine\DBAL\Driver\Statement The prepared statement. */ public function prepare( $statement, $limit=null, $offset=null ) { - $statement = $this->replaceTablePrefix($statement); - $statement = $this->adapter->fixupStatement($statement); - if ($limit === -1) { $limit = null; } @@ -76,7 +73,10 @@ class Connection extends \Doctrine\DBAL\Connection { return $this->preparedQueries[$statement]; } } - if(\OC_Config::getValue( "log_query", false)) { + $statement = $this->replaceTablePrefix($statement); + $statement = $this->adapter->fixupStatement($statement); + + if(\OC_Config::getValue( 'log_query', false)) { \OC_Log::write('core', 'DB prepare : '.$statement, \OC_Log::DEBUG); } $result = parent::prepare($statement); |