Page MenuHomePhabricator

Upgrading from version 1.18 (r107923) to version 1.19 (r111063) causes MySQL error
Closed, ResolvedPublic

Description

Author: awikiuser

Description:
Versions:

  • MediaWiki: 1.19 (r111112)
  • PHP: 5.3.2-2wm1
  • Database: MySQL 5.1.53-wm-log

URL: unavailable (internal network)

Summary: Upgrading from version 18 (r107923) to version 19 (r111063) breaks my wiki.

Error message displayed in browser:

Database error
Jump to: navigation, search
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

SELECT rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_user_text,rev_user,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,page_namespace,page_title,page_id,page_latest,user_name FROM `revision` INNER JOIN `page` ON ((page_id = rev_page)) LEFT JOIN `user` ON ((rev_user != 0) AND (user_id = rev_user)) WHERE page_id = '1' AND rev_id = '2339' LIMIT 1

from within function "Revision::fetchFromConds". Database returned error "1054: Unknown column 'rev_sha1' in 'field list' (localhost)".

Possible cause:
The output from maintenance/update.php suggests it may be failing because maintenance/archives/patch-config.sql does not exist.

Output from maintenance/update.php

Creating config table...Could not open "/export/wiki/maintenance/archives/patch-config.sql".

Backtrace:
#0 /export/wiki/includes/installer/DatabaseUpdater.php(420): DatabaseBase->sourceFile('/export/wiki/ma...')
#1 /export/wiki/includes/installer/DatabaseUpdater.php(435): DatabaseUpdater->applyPatch('patch-config.sq...', false)
#2 [internal function]: DatabaseUpdater->addTable('config', 'patch-config.sq...')
#3 /export/wiki/includes/installer/DatabaseUpdater.php(281): call_user_func_array(Array, Array)
#4 /export/wiki/includes/installer/DatabaseUpdater.php(244): DatabaseUpdater->runUpdates(Array, false)
#5 /export/wiki/maintenance/update.php(121): DatabaseUpdater->doUpdates(Array)
#6 /export/wiki/maintenance/doMaintenance.php(105): UpdateMediaWiki->execute()
#7 /export/wiki/maintenance/update.php(151): require_once('/export/wiki/ma...')
#8 {main}</nowiki>

It appears that "maintenance/archives/patch-config.sql" was removed in revision 111006:

svn log -l 1 http://svn.wikimedia.org/svnroot/mediawiki/branches/REL1_19/phase3/maintenance/archives/patch-config.sql
svn: '/svnroot/mediawiki/!svn/bc/111110/branches/REL1_19/phase3/maintenance/archives/patch-config.sql' path not found

svn log -v -gr 111006 http://svn.wikimedia.org/svnroot/mediawiki/branches/REL1_19/phase3/maintenance/archives

r111006 | reedy | 2012-02-08 19:16:19 -0600 (Wed, 08 Feb 2012) | 1 line
Changed paths:

M /branches/REL1_19/phase3/RELEASE-NOTES-1.19
M /branches/REL1_19/phase3/includes/AutoLoader.php
M /branches/REL1_19/phase3/includes/ChangesList.php
M /branches/REL1_19/phase3/includes/RecentChange.php
M /branches/REL1_19/phase3/includes/User.php
D /branches/REL1_19/phase3/includes/conf
D /branches/REL1_19/phase3/maintenance/archives/patch-config.sql
M /branches/REL1_19/phase3/maintenance/tables.sql

Revert r88270, r97711 and r110825 out of 1.19

Temporary solution:
Revert back to version 18.


Version: 1.20.x
Severity: normal
OS: Linux
Platform: PC

Details

Reference
bz34310

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:18 AM
bzimport set Reference to bz34310.
bzimport added a subscriber: Unknown Object (MLST).