Last modified: 2014-03-01 11:12:25 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 61971 - join_conds in SQL select wrapper seem broken in Postgress
join_conds in SQL select wrapper seem broken in Postgress
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: postgres
  Show dependency treegraph
Reported: 2014-02-27 00:01 UTC by michaelcirello2
Modified: 2014-03-01 11:12 UTC (History)
3 users (show)

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


Description michaelcirello2 2014-02-27 00:01:15 UTC
Special pages (BrokenRedirects, etc) are generating invalid SQL.  It seems the 'from' and 'join' clauses are not being constructed correctly.  This is with Postgres as the db if it matters.  

Example query generated from brokenredirects below.  Note FROM "p2".  This obviously doesn't exist and was supposed to be part of a join that is not included at all.

SELECT /* BrokenRedirectsPage::reallyDoQuery Mike */  
        p1.page_namespace AS namespace,
        p1.page_title AS title,
        p1.page_title AS VALUE,
FROM "p2"  
WHERE (rd_namespace >= 0) AND
        (rd_interwiki IS NULL OR rd_interwiki = '') AND
        (p2.page_namespace IS NULL)  
ORDER BY rd_namespace,rd_title,rd_from
LIMIT 51  
Comment 1 Bawolff (Brian Wolff) 2014-02-27 00:05:15 UTC
>This is with Postgres as the db if it matters.

Yep it does. (How SQL is constructed is different for every db backend)
Comment 2 Sam Reed (reedy) 2014-02-27 00:08:27 UTC
Testing this locally on 1.22.2 and using mysql seems to work fine. Highly suspect its an issue with the postgres wrapper class
Comment 3 Umherirrender 2014-02-27 20:01:57 UTC
Sounds like the problem from bug 60031
Comment 4 db [inactive,noenotif] 2014-03-01 11:12:25 UTC
Fixed in the meantime, should be part of 1.22.3 (Looks like bug 60531)

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