diff --git a/src/Jackalope/Transport/DoctrineDBAL/Client.php b/src/Jackalope/Transport/DoctrineDBAL/Client.php index 4727effd..5d0c38f2 100644 --- a/src/Jackalope/Transport/DoctrineDBAL/Client.php +++ b/src/Jackalope/Transport/DoctrineDBAL/Client.php @@ -1488,6 +1488,11 @@ public function query(\PHPCR\Query\QueryInterface $query) $limit = $query->getLimit(); $offset = $query->getOffset(); + //hack to avoid a bug in Doctrine DBAL with MySQL, see http://www.doctrine-project.org/jira/browse/DBAL-256 + if ($this->conn->getDatabasePlatform()->getName() === 'mysql' && null !== $offset && null == $limit) { + $limit = PHP_INT_MAX; + } + $language = $query->getLanguage(); if ($language === QueryInterface::JCR_SQL2) { $parser = new Sql2ToQomQueryConverter($this->factory->get('Query\QOM\QueryObjectModelFactory'));