Page MenuHomePhabricator

Special:Log can give database error
Closed, ResolvedPublic

Description

Author: matthew.britton

Description:
http://en.wikipedia.org/wiki/Special:Log

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 "IndexPager::reallyDoQuery (LogPager)". MySQL returned error "1104: The SELECT would examine more rows than MAX_JOIN_SIZE. Check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok (10.0.6.24)".


Version: unspecified
Severity: normal

Details

Reference
bz18657

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:36 PM
bzimport set Reference to bz18657.
bzimport added a subscriber: Unknown Object (MLST).

For now I've synced in livehack, to get it to FIXED we probably have to think how to fix it for everyone within MediaWiki:

  • includes/specials/SpecialLog.php (revision 48811)

+++ includes/specials/SpecialLog.php (working copy)
@@ -55,6 +55,10 @@

  1. Create a LogPager item to get the results and a LogEventsList item to format them... $loglist = new LogEventsList( $wgUser->getSkin(), $wgOut, 0 ); $pager = new LogPager( $loglist, $type, $user, $title, $pattern, array(), $y, $m, $tagFilter );

+ Live hack - if no (or few) log entries have change tags,
+
optimizer returns low index cardinality, so MySQL thinks the join will go over MAX_JOIN_SIZE
+ // Domas, May 3, 2009
+ $pager->mDb->query("SET SQL_BIG_SELECTS=1",$fname,true);

  1. Set title and add header $loglist->showHeader( $pager->getType() );
  2. Show form options

matrikel wrote:

I encountered a similar bug on my mediawiki-installation after updating from v14 to v15: http://www.wikifications.de/index.php5?title=Test whenever I try to open a non existing page: <code> 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 "IndexPager::reallyDoQuery (LogPager)". MySQL returned error "1146: Table '42023m32101_1.mw_tag_summary' doesn't exist (mysql.goneo.de)".</code>

(In reply to comment #2)

from within function "IndexPager::reallyDoQuery (LogPager)". MySQL returned
error "1146: Table '42023m32101_1.mw_tag_summary' doesn't exist
(mysql.goneo.de)".</code>

That just means you haven't run the update script.

http://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script

matthew.britton wrote:

Changed title and lowered priority as the urgent part of the issue -- failure on en.wikipedia -- was resolved.

was applied in MediaWiki core in r50168.