Last modified: 2014-03-01 11:12:25 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 T63971, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61971 - join_conds in SQL select wrapper seem broken in Postgress
join_conds in SQL select wrapper seem broken in Postgress
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.22.2
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: ---


Attachments

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,
        rd_namespace,
        rd_title  
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  
FOR UPDATE OF p1
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.


Navigation
Links