Last modified: 2014-05-03 01:08:23 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 T60324, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58324 - [[Special:Random/Education Program]] throws a database error
[[Special:Random/Education Program]] throws a database error
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.23.0
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-11 11:40 UTC by This, that and the other (TTO)
Modified: 2014-05-03 01:08 UTC (History)
7 users (show)

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


Attachments

Description This, that and the other (TTO) 2013-12-11 11:40:35 UTC
[[Special:Random/Education Program]] gives this:

----
A database query error has occurred. This may indicate a bug in the software.

    Function: RandomPage::selectRandomPageFromDB
    Error: 0 
----

Not sure if this is a bug in the EducationProgram extension or in MediaWiki core code.
Comment 1 Brad Jorsch 2013-12-11 14:24:18 UTC
The following lines show up in dberrors.log when I try loading that page:

Wed Dec 11 14:12:41 UTC 2013	mw1112	enwiki	Connection lost and reconnected after 99.509s, query: SELECT /* RandomPage::selectRandomPageFromDB  */  page_title,page_namespace  FROM `page`  FORCE INDEX (page_random) WHERE page_namespace = '446' AND page_is_redirect = '0' AND (page_random >= 0)  ORDER BY page_random LIMIT 1  
Wed Dec 11 14:12:41 UTC 2013	mw1112	enwiki	RandomPage::selectRandomPageFromDB	10.64.32.22	0		SELECT  page_title,page_namespace  FROM `page`  FORCE INDEX (page_random) WHERE page_namespace = '446' AND page_is_redirect = '0' AND (page_random >= 0)  ORDER BY page_random LIMIT 1  

A quick check in the database finds zero rows for SELECT * FROM page WHERE page_namespace = '446' on enwiki.
Comment 2 Bawolff (Brian Wolff) 2013-12-12 15:33:34 UTC
Hmm, the FORCE INDEX looks inappropriate there.
Comment 3 Andre Klapper 2013-12-13 13:49:51 UTC
Rage Soss: ping?
Comment 4 Sage Ross 2013-12-13 14:08:49 UTC
I talked with Andrew Green about this a little bit yesterday. From a user perspective, it's not very important to have Special:Random work for the Education Program namespace, but I suggested to Andrew to simply catch this situation and display a message to the effect that Special:Random is not available for that namespace.
Comment 5 Brad Jorsch 2013-12-13 14:25:40 UTC
It looks like there are two issues here:

1. Special:Random doesn't handle empty namespaces (or almost-empty namespaces, I'd guess) well when there are a very large number of pages in other namespaces.

2. EducationProgram doesn't work with Special:Random (or Special:AllPages, or probably various other bits of MediaWiki), because it doesn't use the page table at all.

I'd suggest splitting the second problem to a new bug.
Comment 6 Sean Pringle 2013-12-20 06:44:08 UTC
Spotted this in bug 57285 via slow query logs. Same conclusion: the forced index is no longer appropriate.
Comment 7 db [inactive,noenotif] 2014-03-01 12:15:43 UTC
Error is now impossible, because a message is shown:

Random article
There are no pages in the following namespace: Education_Program.

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


Navigation
Links