[Mediawiki-l] Database error when upgrading

Jeff Lane jeffl at valvesoftware.com
Tue May 30 23:41:03 UTC 2006


We're having some trouble running an upgrade on one of our 1.4.12
servers to 1.6.6. We previously were able to upgrade on this machine on
test machine, but now when we try to run the upgrade we get this error:

	Cleaning up broken links for namespace -1... ok
	Cleaning up broken links for namespace 1... A database error has
occurred
	Query: UPDATE `mw_pagelinks`
	                   SET pl_namespace=1,
	                       pl_title=TRIM(LEADING 'Talk:' FROM
pl_title)
	                 WHERE pl_namespace=0
	                   AND pl_title LIKE 'Talk:%'
	Function: do_pagelinks_namespace
	Error: 1062 Duplicate entry '5850-1-Main_Page' for key 1
(localhost)
	 
	Backtrace:
	GlobalFunctions.php line 602 calls wfbacktrace()
	Database.php line 473 calls wfdebugdiebacktrace()
	Database.php line 419 calls database::reportqueryerror()
	updaters.inc line 567 calls database::query()
	updaters.inc line 544 calls do_pagelinks_namespace()
	updaters.inc line 804 calls do_pagelinks_update()
	update.php line 67 calls do_all_updates()
	 
	<!-- Served by devtemp in 358.02 secs. -->
	 
	real    5m58.350s
	user    0m0.534s
	sys     0m0.986s

Next we tried going from 1.4.12 to 1.5.8, to see if we could do an
incremental upgrade, and we get the same error:

	Cleaning up broken links for namespace 1... A database error has
occurred
	Query: UPDATE `mw_pagelinks`
	                   SET pl_namespace=1,
	                       pl_title=TRIM(LEADING 'Talk:' FROM
pl_title)
	                 WHERE pl_namespace=0
	                   AND pl_title LIKE 'Talk:%'
	Function: do_pagelinks_namespace
	Error: 1062 Duplicate entry '5850-1-Main_Page' for key 1
(localhost)
	 
	Backtrace:
	GlobalFunctions.php line 450 calls wfbacktrace()
	Database.php line 397 calls wfdebugdiebacktrace()
	Database.php line 347 calls database::reportqueryerror()
	updaters.inc line 532 calls database::query()
	updaters.inc line 509 calls do_pagelinks_namespace()
	updaters.inc line 689 calls do_pagelinks_update()
	update.php line 31 calls do_all_updates()
		
Any ideas? The site seems to be functioning fine on 1.4.12 at this
point.



More information about the MediaWiki-l mailing list