Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php MediaWiki 1.25.2从1.10升级脚本失败_Php_Mysql_Upgrade_Mediawiki - Fatal编程技术网

Php MediaWiki 1.25.2从1.10升级脚本失败

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

我正在尝试将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: 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更新脚本中

信息
  • altertable IF EXISTS
    仅适用于PostgreSQL>=9.2
  • 这已经在维基媒体上报道过了
修复错误 尝试删除
/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?:)引入)