Last modified: 2012-11-01 17:29:50 UTC
When running update.php on SQLStore3 I'm getting the following error: Setting up internal property indices ... ... space for internal properties already allocated. ... writing entries for internal properties ...A database query syntax error has occurred. The last attempted database query was: "INSERT INTO `mw_smw_stats` (pid,usage_count) VALUES ('1','0')" from within function "SMWSQLStore3SetupHandlers::setupPredefinedProperties". Database returned error "1062: Duplicate entry '1' for key 'pid' (localhost)" This is after it was already setup, so presumably a check is failing and trying to create an index that already exists.
Looks like there are queries that are not using the MW DB abstraction layer and breaking whenever run on a setup that uses table prefixes. Some are fixed here https://gerrit.wikimedia.org/r/#/c/29302/
This can be fixed by replacing the insert query in SMW_SQLStore3_SetupHandlers.php (line 230) with a replace query like this // Properties also need to be in smw_stats $db->replace( 'smw_stats', array( 'pid' ), array( 'pid' => $id, 'usage_count' => 0 ), __METHOD__ ); But unfortunately I am not able to push my commits right now through git.
Yay! git worked https://gerrit.wikimedia.org/r/#/c/29753/