Last modified: 2009-10-17 12:24: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 T22256, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 20256 - RecentChanges and RecentChangesLinked broken for SQLite
RecentChanges and RecentChangesLinked broken for SQLite
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.16.x
PC Windows XP
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks: sqlite
  Show dependency treegraph
 
Reported: 2009-08-15 11:04 UTC by Max Semenik
Modified: 2009-10-17 12:24 UTC (History)
0 users

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


Attachments
Proposed patch (3.02 KB, patch)
2009-09-05 18:19 UTC, Max Semenik
Details

Description Max Semenik 2009-08-15 11:04:46 UTC
SQL error from within function "SpecialRecentChanges::doMainQuery". SQLite returned error "1: near "(": syntax error".

Query:

(SELECT * FROM recentchanges LEFT JOIN watchlist ON ((wl_user=2 AND wl_title=rc_title AND wl_namespace=rc_namespace)) LEFT JOIN page ON ((rc_cur_id=page_id)) LEFT JOIN tag_summary ON ((ts_rc_id=rc_id)) WHERE rc_new = '1' AND (rc_timestamp >= '20090808000000') AND rc_bot = '0' ORDER BY rc_timestamp DESC LIMIT 50 ) UNION (SELECT * FROM recentchanges LEFT JOIN watchlist ON ((wl_user=2 AND wl_title=rc_title AND wl_namespace=rc_namespace)) LEFT JOIN page ON ((rc_cur_id=page_id)) LEFT JOIN tag_summary ON ((ts_rc_id=rc_id)) WHERE rc_new = '0' AND (rc_timestamp >= '20090808000000') AND rc_bot = '0' ORDER BY rc_timestamp DESC LIMIT 50 ) ORDER BY rc_timestamp DESC LIMIT 50
Comment 1 Max Semenik 2009-08-17 19:11:24 UTC
Probably it just can't handle () UNION ():

sqlite> select 1 as foo union select 2 as foo;
1
2
sqlite> (select 1 as foo) union (select 2 as foo);
SQL error: near "(": syntax error
Comment 2 Max Semenik 2009-09-05 18:19:42 UTC
Created attachment 6532 [details]
Proposed patch
Comment 3 Max Semenik 2009-10-17 12:24:55 UTC
Patch committed in r57861

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


Navigation
Links