Page MenuHomePhabricator

Running update.php with an SQLite-runned wiki while SocialProfile is installed will return a database query error
Closed, ResolvedPublic

Description

Trying to run php update.php on a wiki with SocialProfile installed and using SQLite will return an error like this below. This error also happened in the files user_points_weekly.sql and user_points_monthly.sql, and the suggested fix by @ashley was to comment out the line with CREATE INDEX. This was done for both, and the same error kept appearing except for a different SQL file.

Query: CREATE INDEX up_user_id ON user_points_archive (up_user_id)

Function: Database::sourceFile( C:\xampp\htdocs\ShoutWiki\extensions\SocialProfile/UserStats/user_points_a
rchive.sql )
Error: 1 index up_user_id already exists

Backtrace:
#0 C:\xampp\htdocs\ShoutWiki\includes\libs\rdbms\database\Database.php(912): Database->reportQueryError(st
ring, integer, string, string, boolean)
#1 C:\xampp\htdocs\ShoutWiki\includes\libs\rdbms\database\Database.php(3136): Database->query(string, stri
ng)
#2 C:\xampp\htdocs\ShoutWiki\includes\libs\rdbms\database\Database.php(3085): Database->sourceStream(unkno
wn type, NULL, NULL, string, NULL)
#3 C:\xampp\htdocs\ShoutWiki\includes\installer\DatabaseUpdater.php(690): Database->sourceFile(string)
#4 C:\xampp\htdocs\ShoutWiki\includes\installer\DatabaseUpdater.php(733): DatabaseUpdater->applyPatch(stri
ng, boolean, string)
#5 [internal function]: DatabaseUpdater->addTable(string, string, boolean)
#6 C:\xampp\htdocs\ShoutWiki\includes\installer\DatabaseUpdater.php(472): call_user_func_array(array, arra
y)
#7 C:\xampp\htdocs\ShoutWiki\includes\installer\DatabaseUpdater.php(437): DatabaseUpdater->runUpdates(arra
y, boolean)
#8 C:\xampp\htdocs\ShoutWiki\maintenance\update.php(172): DatabaseUpdater->doUpdates(array)
#9 C:\xampp\htdocs\ShoutWiki\maintenance\doMaintenance.php(111): UpdateMediaWiki->execute()
#10 C:\xampp\htdocs\ShoutWiki\maintenance\update.php(217): require_once(string)
#11 {main}

Details

Related Gerrit Patches:
mediawiki/extensions/RandomFeaturedUser : masterMake up_user_id indexes unique to resolve DB query error
mediawiki/extensions/SocialProfile : masterMake up_user_id indexes unique to resolve DB query error

Event Timeline

Change 335733 had a related patch set uploaded (by SamanthaNguyen):
Make up_user_id indexes unique to resolve DB query error

https://gerrit.wikimedia.org/r/335733

I don't think this is related to DBA, so I am going to remove the tag. If you think it is really us, ping me!

Thanks

Change 336105 had a related patch set uploaded (by SamanthaNguyen):
Make up_user_id indexes unique to resolve DB query error

https://gerrit.wikimedia.org/r/336105

Change 335733 merged by jenkins-bot:
Make up_user_id indexes unique to resolve DB query error

https://gerrit.wikimedia.org/r/335733

Change 336105 merged by jenkins-bot:
Make up_user_id indexes unique to resolve DB query error

https://gerrit.wikimedia.org/r/336105

SamanthaNguyen closed this task as Resolved.Feb 5 2017, 7:04 PM
SamanthaNguyen claimed this task.
SamanthaNguyen edited projects, added RandomFeaturedUser; removed Patch-For-Review.
SamanthaNguyen moved this task from Backlog to Bugs on the RandomFeaturedUser board.