Page MenuHomePhabricator

DynamicPageList2 compatibility problem with PostgreSQL: LIMIT #,# syntax not supported
Closed, ResolvedPublic

Description

Using actual version of DynamicPageList2 with Mediawiki and PostgreSQL database does not work.

It's due to "LIMIT offset,row_count" usage in DPLMain.php. For Postgresql compatibility, it's better to use "LIMIT row_count OFFSET offset" syntax.

Here are errors :

SQL ERROR: ERREUR: la syntaxe LIMIT #,# n'est pas supportée
LINE 1: ...ev_page=rev.rev_page ) ORDER BY rev_timestamp ASC LIMIT 0, 1
^
HINT: Utilisez les clauses séparées LIMIT et OFFSET.
Parser: using preprocessor: Preprocessor_DOM
Parser output marked as uncacheable.
SQL ERROR (ignored): ERREUR: la syntaxe LIMIT #,# n'est pas supportée
LINE 1: ...ev_page=rev.rev_page ) ORDER BY rev_timestamp ASC LIMIT 0, 1
^
HINT: Utilisez les clauses séparées LIMIT et OFFSET.
[exception] [ab8564cb] /index.php/Accueil Exception from line 554 of /var/www/cnp31wiki/intranet/includes/db/DatabasePostgres.php: Unable to free Postgres result


Version: unspecified
Severity: normal

Details

Reference
bz68994

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:27 AM
bzimport set Reference to bz68994.

Please provide exact version information for MediaWiki, DynamicPageList2 and Postgres so somebody who tries to reproduce does not need to check dozens of combinations. :)
Also see https://www.mediawiki.org/wiki/How_to_report_a_bug for general information.

Here are the versions I used : DynamicPageList2 v2.3.0, MediaWiki v2.23.2, PostgreSQL v8.4.

Change 151265 had a related patch set uploaded by Jjanes:
DynamicPageList: Use more standard LIMIT syntax

https://gerrit.wikimedia.org/r/151265

Change 151265 merged by jenkins-bot:
DynamicPageList: Use more standard LIMIT syntax

https://gerrit.wikimedia.org/r/151265

All patches mentioned in this report were merged or abandoned - is there more work left to do here (if yes: please reset the bug report status to NEW or ASSIGNED), or can you close this ticket as RESOLVED FIXED?

Andre, I think you are the only one subscribed to this bug who has the power close them. Or at least if I can, it is not obvious how.

Jdforrester-WMF subscribed.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.