diff --git a/lib/private/db/connection.php b/lib/private/db/connection.php
index 53935c1e1ed9f9c2d7652f9098722a6d862b432c..6ba29fc2ccfdada7a67c2e6a2aca7045effeba18 100644
--- a/lib/private/db/connection.php
+++ b/lib/private/db/connection.php
@@ -79,8 +79,6 @@ class Connection extends \Doctrine\DBAL\Connection implements IDBConnection {
 		if (!is_null($limit)) {
 			$platform = $this->getDatabasePlatform();
 			$statement = $platform->modifyLimitQuery($statement, $limit, $offset);
-		} else {
-			$origStatement = $statement;
 		}
 		$statement = $this->replaceTablePrefix($statement);
 		$statement = $this->adapter->fixupStatement($statement);
@@ -92,17 +90,19 @@ class Connection extends \Doctrine\DBAL\Connection implements IDBConnection {
 	}
 
 	/**
-	 * Executes an, optionally parameterized, SQL query.
+	 * Executes an, optionally parametrized, SQL query.
 	 *
-	 * If the query is parameterized, a prepared statement is used.
+	 * If the query is parametrized, a prepared statement is used.
 	 * If an SQLLogger is configured, the execution is logged.
 	 *
-	 * @param string $query The SQL query to execute.
-	 * @param string[] $params The parameters to bind to the query, if any.
-	 * @param array $types The types the previous parameters are in.
-	 * @param QueryCacheProfile $qcp
+	 * @param string                                      $query  The SQL query to execute.
+	 * @param array                                       $params The parameters to bind to the query, if any.
+	 * @param array                                       $types  The types the previous parameters are in.
+	 * @param \Doctrine\DBAL\Cache\QueryCacheProfile|null $qcp    The query cache profile, optional.
+	 *
 	 * @return \Doctrine\DBAL\Driver\Statement The executed statement.
-	 * @internal PERF: Directly prepares a driver statement, not a wrapper.
+	 *
+	 * @throws \Doctrine\DBAL\DBALException
 	 */
 	public function executeQuery($query, array $params = array(), $types = array(), QueryCacheProfile $qcp = null)
 	{
@@ -117,11 +117,13 @@ class Connection extends \Doctrine\DBAL\Connection implements IDBConnection {
 	 *
 	 * This method supports PDO binding types as well as DBAL mapping types.
 	 *
-	 * @param string $query The SQL query.
-	 * @param array $params The query parameters.
-	 * @param array $types The parameter types.
+	 * @param string $query  The SQL query.
+	 * @param array  $params The query parameters.
+	 * @param array  $types  The parameter types.
+	 *
 	 * @return integer The number of affected rows.
-	 * @internal PERF: Directly prepares a driver statement, not a wrapper.
+	 *
+	 * @throws \Doctrine\DBAL\DBALException
 	 */
 	public function executeUpdate($query, array $params = array(), array $types = array())
 	{