Debian series upgrade (e.g. 5.5->5.6) runs mysql_install_db
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
New
|
Undecided
|
Unassigned |
Bug Description
In #1507812, mysql_install_db was skipped on upgrade.
https:/
https:/
However, it appears the postinst script is not aware that installing 5.6 over 5.5 is an upgrade and it still runs.
See this gist for full reproduction:
https:/
Here is a snip of the output with logging I added:
+ apt-get install -y --allow-
...
The following packages were automatically installed and are no longer required:
libperconaser
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libperconaser
percona-
Suggested packages:
tinyca
The following packages will be REMOVED:
percona-
The following NEW packages will be installed:
libperconaser
percona-
0 upgraded, 4 newly installed, 2 to remove and 4 not upgraded.
...
Setting up percona-
Installing new version of config file /etc/init.d/mysql ...
<13>Oct 9 12:27:22 bug1507812: $0 == /var/lib/
<13>Oct 9 12:27:22 bug1507812: $1 == configure
<13>Oct 9 12:27:22 bug1507812: $2 ==
<13>Oct 9 12:27:22 bug1507812: running mysql_install_db
description: | updated |
summary: |
- Minor version upgrades run mysql_install_db + Debian series upgrade (e.g. 5.5->5.6) runs mysql_install_db |
There's a simple explanation why this could happen, the logic checks if it's an package upgrade and then doesn't run the mysql_install_db. But Percona server packages are called differently and have a suffix (-5.5/5.6/5.7) by major version since we only have one repository and so we can't put the same package name in that repo for every major version. So the apt/dpkg doesn't realize that it's an upgrade (package name is different) and thinks we are just making a normal installation.
I didn't test this but from what I see it should be like that.
Also I think you made a mistake in the bug report title - most probably it shouldn't be "Minor version upgrades..." but instead "Major version upgrades..." - so if you agree feel free to fix it.
Not sure how it's going to be fixed but the logic in that "if" check will need to be changed.