Last modified: 2012-08-04 20:48:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 18863 - SELECT ... LIMIT fails on PostgreSQL
SELECT ... LIMIT fails on PostgreSQL
Product: MediaWiki extensions
Classification: Unclassified
NewestPages (Other open bugs)
All All
: Normal minor (vote)
: ---
Assigned To: Rob Church
: patch
Depends on:
Blocks: postgres
  Show dependency treegraph
Reported: 2009-05-21 12:19 UTC by Hans Spaans
Modified: 2012-08-04 20:48 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

Rewrite LIMIT #,# to LIMIT # OFFSET # (818 bytes, patch)
2009-05-21 12:19 UTC, Hans Spaans
Rewrite of mwe-newestpages-r50851-hspaans-1.patch (1.00 KB, patch)
2009-05-31 21:15 UTC, Hans Spaans

Description Hans Spaans 2009-05-21 12:19:49 UTC
Created attachment 6142 [details]
Rewrite LIMIT #,# to LIMIT # OFFSET #

The current SELECT statement fails on PostgreSQL since it doesn't support LIMIT #,#, but both MySQL and PostgreSQL do support LIMIT # OFFSET #. The patch attached should make the SELECT statement work with both MySQL and PostgreSQL.
Comment 1 Brion Vibber 2009-05-26 21:05:28 UTC
This should be using database abstraction functions -- in this case it should be possible to build the query more cleanly with Database::select(); alternately at least use Database::limitOffset() to generate the LIMIT/OFFSET portions in a way that'll work for the DB backend in use.
Comment 2 Hans Spaans 2009-05-31 21:15:05 UTC
Created attachment 6180 [details]
Rewrite of mwe-newestpages-r50851-hspaans-1.patch
Comment 3 Siebrand Mazeland 2009-06-01 17:00:59 UTC
Applied in r51295. Thanks.

Note You need to log in before you can comment on or make changes to this bug.