Php MediaWiki 1.25.2从1.10升级脚本失败
我正在尝试将mediawiki数据库从1.10升级到1.23.10(1.25.2也是如此)。我已经完成了MediaWiki升级页面中描述的所有步骤,但脚本失败,出现以下错误:Php MediaWiki 1.25.2从1.10升级脚本失败,php,mysql,upgrade,mediawiki,Php,Mysql,Upgrade,Mediawiki,我正在尝试将mediawiki数据库从1.10升级到1.23.10(1.25.2也是如此)。我已经完成了MediaWiki升级页面中描述的所有步骤,但脚本失败,出现以下错误: Updating indexes to 20031107 ...A database query error has occurred. Query: ALTER TABLE IF EXISTS `links` DROP INDEX l_from, ADD INDEX l_from (l_from) Function
Updating indexes to 20031107 ...A database query error has occurred.
Query: ALTER TABLE IF EXISTS `links`
DROP INDEX l_from,
ADD INDEX l_from (l_from)
Function: DatabaseBase::sourceFile( patch-indexes.sql )
Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `links`\x0A DROP INDEX l_from,\x0A ADD INDEX l_from (l_from)' at line 1 (localhost)
PHP Notice: Uncommitted DB writes (transaction from DatabaseUpdater::doUpdates). in /home/max/newforum2/mediawiki-1.23.10/includes/db/Database.php on line 4147
我正在使用PHP5.5.9-1ubuntu4.13(cli)和MySQL 5.5.44
TiiJ7已经说过:这个bug出现在MediaWiki更新脚本中强>
信息
仅适用于PostgreSQL>=9.2altertable IF EXISTS
- 这已经在维基媒体上报道过了
/maintenance/archives
文件夹中补丁索引.sql
文件中的代码部分(如果存在)
由此:
ALTER TABLE IF EXISTS/*$wgDBprefix*/links
DROP INDEX l_from,
ADD INDEX l_from (l_from);
ALTER TABLE /*$wgDBprefix*/brokenlinks
DROP INDEX bl_to,
ADD INDEX bl_to (bL_to);
ALTER TABLE /*$wgDBprefix*/recentchanges
为此:
ALTER TABLE /*$wgDBprefix*/links
DROP INDEX l_from,
ADD INDEX l_from (l_from);
ALTER TABLE /*$wgDBprefix*/brokenlinks
DROP INDEX bl_to,
ADD INDEX bl_to (bL_to);
ALTER TABLE /*$wgDBprefix*/recentchanges
似乎是更新程序的错误<代码>更改表格(如果存在)仅适用于PostgreSQL>=9.2。应该在什么地方报告。同时,您可以尝试删除
/maintenance/archives/patch index.sql中的部分(如果存在),该部分由@TiiJ7 want file a patch?:)引入)