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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T17173, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15173 - API Query Links not db agnostic
API Query Links not db agnostic
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.14.x
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: ---


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

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.


Navigation
Links