Wrong Column Type everywhere + other errors on fresh DB upgrade

Expected

No silly table errors.

What happens

Getting a lot of Wrong Column Type issues after fresh upgrade (which includes loading quickstart DB template). Few tables have other issue types. You can see whole log output here: https://pastebin.com/q7yhW3wb

Reproduction Instructions

Happens basically everywhere I installed Phabricator/MySQL: CentOS 8, Ubuntu 18.04/20.04, WSL Ubuntu 20.04, Windows 10 (only MySQL Server).

  1. Install latest Phabricator.
    1.1. Make sure MySQL server’s version is >=8.0.
  2. Create MySQL user phabricator and grant it DB Admin privileges.
  3. Run ./bin/storage upgrade --user phabricator --password <password>.
    3.1. You may repeat it, but errors won’t disappear.

Log Output (short)

user@PC:/srv/phabricator$ sudo ./bin/storage upgrade --user phabricator --password <password>
Before running storage upgrades, you should take down the Phabricator web
interface and stop any running Phabricator daemons (you can disable this
warning with --force).

    Are you ready to continue? [y/N] y

Loading quickstart template onto "localhost:3306"...
Applying patch "phabricator:db.paste" to host "localhost:3306"...
Applying patch "phabricator:20190523.myisam.01.documentfield.sql" to host "localhost:3306"...
Applying patch "phabricator:20190718.paste.01.edge.sql" to host "localhost:3306"...
Applying patch "phabricator:20190718.paste.02.edgedata.sql" to host "localhost:3306"...
Applying patch "phabricator:20190718.paste.03.paste.sql" to host "localhost:3306"...
Applying patch "phabricator:20190718.paste.04.xaction.sql" to host "localhost:3306"...
Applying patch "phabricator:20190718.paste.05.comment.sql" to host "localhost:3306"...
Applying patch "phabricator:20190802.email.01.storage.sql" to host "localhost:3306"...
Applying patch "phabricator:20190802.email.02.xaction.sql" to host "localhost:3306"...
Applying patch "phabricator:20190815.account.01.carts.php" to host "localhost:3306"...
Applying patch "phabricator:20190815.account.02.subscriptions.php" to host "localhost:3306"...
Applying patch "phabricator:20190816.payment.01.xaction.sql" to host "localhost:3306"...
Applying patch "phabricator:20190816.subscription.01.xaction.sql" to host "localhost:3306"...
Applying patch "phabricator:20190822.merchant.01.view.sql" to host "localhost:3306"...
Applying patch "phabricator:20190909.herald.01.rebuild.php" to host "localhost:3306"...
Applying patch "phabricator:20190924.diffusion.01.permanent.sql" to host "localhost:3306"...
Applying patch "phabricator:20190924.diffusion.02.default.sql" to host "localhost:3306"...
Applying patch "phabricator:20191028.uriindex.01.rebuild.php" to host "localhost:3306"...
Applying patch "phabricator:20191113.identity.01.email.sql" to host "localhost:3306"...
Applying patch "phabricator:20191113.identity.02.populate.php" to host "localhost:3306"...
Applying patch "phabricator:20191113.identity.03.unassigned.sql" to host "localhost:3306"...
Applying patch "phabricator:20191114.email.01.phid.sql" to host "localhost:3306"...
Applying patch "phabricator:20191114.email.02.populate.php" to host "localhost:3306"...
Applying patch "phabricator:20200220.xaccount.01.sql" to host "localhost:3306"...
Applying patch "phabricator:20200222.xident.01.migrate.php" to host "localhost:3306"...
Applying patch "phabricator:20200222.xident.02.dropkey.php" to host "localhost:3306"...
Applying patch "phabricator:20200416.paste.01.ferret.doc.sql" to host "localhost:3306"...
Applying patch "phabricator:20200416.paste.02.ferret.field.sql" to host "localhost:3306"...
Applying patch "phabricator:20200416.paste.03.ferret.ngrams.sql" to host "localhost:3306"...
Applying patch "phabricator:20200416.paste.04.ferret.cngrams.sql" to host "localhost:3306"...
Applying patch "phabricator:20200417.viewstate.01.storage.sql" to host "localhost:3306"...
Applying patch "phabricator:20200428.inline.01.differential.column.sql" to host "localhost:3306"...
Applying patch "phabricator:20200428.inline.02.diffusion.column.sql" to host "localhost:3306"...
Applying patch "phabricator:20200428.inline.03.differential.value.sql" to host "localhost:3306"...
Applying patch "phabricator:20200428.inline.04.diffusion.value.sql" to host "localhost:3306"...
Storage is up to date. Use "storage status" for details.
Synchronizing static tables...
Verifying database schemata on "localhost:3306"...


Database                 Table                                       Name                 Issues
phabricator_almanac      almanac_binding                             dateCreated          Wrong Column Type
# < ... > 1655 MORE PROBLEMATIC TABLES

Applying schema adjustments...
Done.
Completed applying all schema adjustments.
 ANALYZE  Analyzing tables...
Done.
 ANALYZED  Analyzed 541 table(s).

Phabricator/Arcanist Version

arcanist 6937d389472d63fe3fb251cbf733f8d21ba33950 (4 May 2020)

This is likely an issue specific to MySQL Server. I can not reproduce it against MySQL and haven’t seen similar reports against MariaDB, RDS, Google Cloud SQL, etc. There’s currently no interest in MySQL Server from customers, so I don’t currently plan to support it.

Can somebody kindly remove mysql-server from installation script then? Because it’s basically confusing matter. Installation Guide says:

Er, sorry, I may have misunderstood – are you using “SQL Server” (owned by Microsoft) or “MySQL” (owned by Oracle)? I assumed you meant “SQL Server” because you’re using Windows 10, but maybe you’ve just installed MySQL on Windows?

In either case, neither SQL Server support nor MySQL-on-Windows support are currently on the roadmap, and the installation instructions are already clear that the Phabricator server components do not support Windows:

However, the server software does not run on Windows.
https://secure.phabricator.com/book/phabricator/article/installation_guide/

MySQL

I was struck by this issue even before, when I installed everything on Ubuntu. Plus Installation Guide doesn’t point out limited support for MySQL Server. While there are some manuals in the Internet trying to make use of MariaDB with Phabricator, they don’t really say why though.

I can’t reproduce this issue on Ubuntu (with MySQL 5.5.62) or MacOS (with MySQL 8.0.11), and I’ve never seen any other user encounter this issue.

I’m happy to fix it if I can reproduce it, but I don’t know how to reproduce it.

Plus Installation Guide doesn’t point out limited support for MySQL Server.

MySQL is supported. I incorrectly believed you meant “SQL Server” earlier. I’ve edited my post.

I was able to see the “problems-not-going-away” in a docker setup with Ubuntu 20.40 and apt install mysql-server, but was unable to get the web side up so I gave up the effort.

mysql Ver 8.0.20-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu)).

Hi, we use Phabricator for the Lubuntu project (and I’ve been meaning to find a way to contribute to upstream, hint hint). I did an OS upgrade on the server from Ubuntu 18.04 LTS to 20.04 LTS and I’ve also noticed this issue.

Things were working perfectly fine with 18.04’s MySQL, which is at 5.7.30. 20.04 is currently at 8.0.19. You’re likely going to see more of this come up as people upgrade to 20.04 (although upgrades aren’t technically enabled for another couple of months, we needed some updated host software). If I had to guess, this is because the database underwent an automated migration.

If you’d like to move away from MySQL in the install script, I’d suggest also providing a migration guide to another DB. Phabricator still works fine for us, it’s just annoying when I go to upgrade it.

I’m able to reproduce this with a fresh install of Phabricator and a fresh install of 18.04 LTS which has then been upgraded to 20.04 LTS. In case you’d like to follow along, here is the install process I went through (with some minor MySQL troubleshooting at the end since it’s not particularly my strong suit) and here is the precise output (took me a second to grab the command from prod).

In case you don’t want to watch the play-by-play, here are clearly-reproducible steps:

  1. Install Ubuntu 18.04 LTS, follow the setup guide to install Phabricator with MySQL, and confirm it works by navigating to the URL in your favorite web browser. I was able to successfully log in and do minor tasks to test. (In this case I swapped out Apache for NGINX + php-fpm, but it’s irrelevant here.)
  2. Upgrade Ubuntu to 20.04 LTS using sudo do-release-upgrade -d (since 20.04.1 isn’t out yet, upgrades aren’t enabled, but it is a released version of Ubuntu). Reboot, and adjust the config for the new php-fpm path if you’re using NGINX. Ensure you can access Phab, and perform a database schema upgrade. You’ll get the warnings OP has described.

(Side note: if I could contribute code to Phabricator, that Ubuntu install script definitely needs some work. If you’d like a tested patch I’ll be happy to provide one.)

1 Like

Thanks. I filed this upstream as https://secure.phabricator.com/T13536.

This should be fixed by https://secure.phabricator.com/D21265.

1 Like
    // See T13536. Display widths for integers were deprecated in MySQL 8.0.17
    // and removed from some display contexts in or around 8.0.19. Older
    // MySQL versions will report "int(10)"; newer versions will report "int".
    // Accept these as equivalent.

Ah, good catch! It seems that issue was clearly analytical and didn’t affect tables, that’s a relieph.