Last modified: 2012-08-04 20:48:55 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 15173 - API Query Links not db agnostic
API Query Links not db agnostic
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Roan Kattouw
: patch
Depends on:
Blocks: postgres
  Show dependency treegraph
Reported: 2008-08-15 08:07 UTC by OverlordQ
Modified: 2012-08-04 20:48 UTC (History)
2 users (show)

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

Fix query (558 bytes, patch)
2008-08-15 08:07 UTC, OverlordQ

Description OverlordQ 2008-08-15 08:07:31 UTC
Created attachment 5177 [details]
Fix query

On lines 79-81 of ApiQueryLinks.php, I'm guessing an attempt at using expression aliases is being done here. However only (afaik) with MySQL is using AS optional, other DB's (PG for example) using AS is required when trying to alias the select expression.

Otherwise you'll get an DB Error when it tries to pass the query:

2008-08-15 02:43:54 CDT ERROR:  syntax error at or near "pl_from" at character 52
2008-08-15 02:43:54 CDT STATEMENT:  SELECT /* ApiQueryLinks::run OverlordQ */  tl_from pl_from,tl_namespace pl_namespace,tl_title pl_title  FROM templatelinks  WHERE tl_from = '58'  ORDER BY tl_namespace, tl_title LIMIT 11
Comment 1 Roan Kattouw 2008-08-15 12:11:26 UTC
Will commit patch when I get back home tomorrow.
Comment 2 Roan Kattouw 2008-08-16 21:02:41 UTC
Patch applied in r39502.

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