mysql_upgrade is called twice concurrently on upgrade from 14.04
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-5.7 (Ubuntu) |
Fix Released
|
High
|
Lars Tangvald | ||
Xenial |
Fix Released
|
High
|
Robie Basak |
Bug Description
Due to the old upstart script still being active, mysql_upgrade is called both via upstart on daemon start and by mysql-server-
[Impact]
Error causes mysql_upgrade to fail, which in turn makes the package installation fail.
[Test case]
Difficult to test fully since it's a race condition bug with two upgrade processes running together.
* Install mysql-server in Ubuntu Trusty
* Upgrade system to Xenial
Expected behavior:
The server installs, and the database is upgraded to support 5.7
Actual behavior:
Occasionally fails with errors like 'performance_schema does not exist' or 'performance_schema already exists'.
[Regression potential]
Debian-start is made a no-op script, so if it did something useful we haven't noticed, that's lost.
---
Let's use this bug to track this particular root cause, since it isn't clear that all the other classes of report will be cleared up by this fix although we think that they may be. We can dupe them in as needed as we find out.
Changed in mysql-5.7 (Ubuntu Xenial): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in mysql-5.7 (Ubuntu Xenial): | |
status: | Triaged → In Progress |
assignee: | nobody → Robie Basak (racb) |
Changed in mysql-5.7 (Ubuntu Xenial): | |
milestone: | none → xenial-updates |
milestone: | xenial-updates → ubuntu-16.04.1 |
description: | updated |
The old debian-start script used by upstart runs mysql_upgrade, checks for crashed tables and checks for passwordless root accounts (printing a warning if one is found).
In 5.7, d/postinst will secure passwordless root accounts with unix socket auth and run mysql_upgrade, and mysql_upgrade itself will check for and fix any crashed tables, so this script is no longer needed.
Additionally this could cause mysql_upgrade to be executed by both upstart and postinst on upgrades, causing various errors.
The solution is to change the script in 5.7 to a no-op