Page MenuHomePhabricator

MediaWiki updater is broken with it failing with Query: SHOW TABLE STATUS LIKE 'revision' ESCAPE '`'
Closed, ResolvedPublic

Description

Steps to reproduce:

  • Go to /mw-config/ enter in the information and then when you reach "There are MediaWiki tables in this database. To upgrade them to MediaWiki 1.30.0-wmf.1, click Continue." click continue

Expected results

  • It to go to the next page and run the sql update.

Actual results

Fails with

[19bc4128952044d6b4272d46] /mw-config/?page=Upgrade Wikimedia\Rdbms\DBQueryError from line 1076 of /home/randomwi/public_html/en/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: SHOW TABLE STATUS LIKE 'revision' ESCAPE '`'
Function: MysqlInstaller::preUpgrade
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 'ESCAPE '`'' at line 1 (localhost)
Backtrace:

#0 /home/randomwi/public_html/en/includes/libs/rdbms/database/Database.php(934): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#1 /home/randomwi/public_html/en/includes/installer/MysqlInstaller.php(183): Wikimedia\Rdbms\Database->query(string, string)
#2 /home/randomwi/public_html/en/includes/installer/WebInstallerUpgrade.php(62): MysqlInstaller->preUpgrade()
#3 /home/randomwi/public_html/en/includes/installer/WebInstaller.php(279): WebInstallerUpgrade->execute()
#4 /home/randomwi/public_html/en/mw-config/index.php(81): WebInstaller->execute(array)
#5 /home/randomwi/public_html/en/mw-config/index.php(39): wfInstallerMain()
#6 {main}

It seems mostly this breakage is caused by https://github.com/wikimedia/mediawiki/commit/6519c42d248a78d2d42edee1beb21f926d227044 as the traceback leads to the line that this change, changes.

Im running mediawiki 1.30 wmf 1 with php 7.1.5 and mysql 5.5.

Event Timeline

Paladox created this task.May 19 2017, 7:45 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 19 2017, 7:45 PM
Reedy added a comment.May 19 2017, 7:46 PM
Server version: 5.5.5-10.1.22-MariaDB-1~yakkety mariadb.org binary distribution

mysql> SHOW TABLE STATUS LIKE 'revision' ESCAPE '`';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ESCAPE '`'' at line 1
Paladox triaged this task as High priority.May 19 2017, 8:03 PM
Anomie added a subscriber: Anomie.May 19 2017, 8:16 PM

You'll probably want to do something like what was done here.

Change 354585 had a related patch set (by Paladox) published:
[mediawiki/core@master] Fix the web updater

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

Change 354616 had a related patch set uploaded (by TTO; owner: Paladox):
[mediawiki/core@REL1_29] Fix the web updater

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

Change 354585 merged by jenkins-bot:
[mediawiki/core@master] Fix the web updater

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

Change 354616 merged by jenkins-bot:
[mediawiki/core@REL1_29] Fix the web updater

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

TTO closed this task as Resolved.May 20 2017, 6:15 AM
TTO assigned this task to Paladox.
Paladox removed a subscriber: gerritbot.
Paladox reopened this task as Open.May 24 2017, 9:52 PM
Paladox raised the priority of this task from High to Unbreak Now!.

Re opening and setting unbreak as it will now be broken again due to my fix breaking beta + will block 1.29 release so needs a new fix :)

Restricted Application added subscribers: Jay8g, TerraCodes. · View Herald TranscriptMay 24 2017, 9:52 PM
Paladox closed this task as Resolved.May 24 2017, 10:22 PM

Reverted the change back. The change did not break beta it's something else.

Aklapper removed a subscriber: Anomie.Oct 16 2020, 5:38 PM