Oracle doesn't support the combination of LIMIT and OFFSET. This is a very common source of question in forums.
I found this page which provides an analysis of this problem on several RDBMS: http://troels.arvin.dk/db/rdbms/#select-limit-offset
It says that the SQL we currently use, ORDER BY ... LIMIT ... OFFSET ...
, isn't standard. But it's supported by PostgreSQL, MySQL and SQLite at least (the test passes on those engines). Also, it's the only solution supported by MySQL, and it's simple. As a consequence, I chose to add a special case for Oracle, and a comment to warn about the use of non-standard SQL.
Since the database cache backend isn't an industrial grade concept, I don't believe someone who has the resources to purchase an Oracle license will ever use it. This patch may be a bit hackish but it fixes the test suite with limited changes.