Last modified: 2010-05-15 15:32:59 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 2813 - MyWatchlist special page do not show due to SQL error
MyWatchlist special page do not show due to SQL error
Status: RESOLVED DUPLICATE of bug 2755
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.4.x
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-12 06:51 UTC by Frédéric VIROT
Modified: 2010-05-15 15:32 UTC (History)
1 user (show)

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


Attachments

Description Frédéric VIROT 2005-07-12 06:51:50 UTC
When selecting 'my watchlist', the following message is shown:
--
 A database query syntax error has occurred. This may indicate a bug in the
software. The last attempted database query was:
    (SQL query hidden)
from within function "wfSpecialWatchlist". MySQL returned error "1146: Table
'wikimedia.watchlist' doesn't exist (localhost)".
--
The problem is in the function wfSpecialWatchlist, in file SpecialWatchlist.php,
around line 165, in the following query:
		$sql = "SELECT 
			rc_namespace cur_namespace, rc_title cur_title, rc_comment cur_comment, 
			rc_cur_id cur_id, rc_user cur_user, 
			rc_user_text cur_user_text, rc_timestamp cur_timestamp, 
			rc_minor cur_minor_edit, rc_new cur_is_new 
------->		FROM watchlist,recentchanges
			WHERE wl_user=$uid AND wl_namespace=rc_namespace AND wl_title=rc_title AND
rc_this_oldid=0
			$docutoff
		UNION SELECT 
			rc_namespace cur_namespace, rc_title cur_title, rc_comment cur_comment, 
			rc_cur_id cur_id, rc_user cur_user, 
			rc_user_text cur_user_text, rc_timestamp cur_timestamp, 
			rc_minor cur_minor_edit, rc_new cur_is_new 
------->		FROM watchlist,recentchanges
			WHERE wl_user=$uid AND wl_namespace+1=rc_namespace AND wl_title=rc_title AND
rc_this_oldid=0
			$docutoff
		ORDER BY cur_timestamp DESC
		";

As may be seen, the names of both the watchlist and the recent changes tables
are hardcoded (see arrows), thus disregarding the table prefix... To fix this,
replace the statements FROM watchlist,recentchanges by FROM
$watchlist,$recentchanges, and everything works fine.
Comment 1 Domas Mituzas 2005-07-12 06:54:47 UTC
already fixed in REL_1_4 branch
Comment 2 Zigger 2005-07-16 08:17:59 UTC

*** This bug has been marked as a duplicate of 2755 ***

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


Navigation
Links