[MDEV-27060] mariadb_upgrade runs every startup Created: 2021-11-16 Updated: 2023-07-23 Resolved: 2021-11-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.5.12 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Thomas Gruenert | Assignee: | Daniel Black |
| Resolution: | Not a Bug | Votes: | 1 |
| Labels: | None | ||
| Environment: |
Linux docker-compose |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
Documentation says: Documentation mysql_upgrade also saves the MariaDB version number in a file named mysql_upgrade_info in the data directory. This is used to quickly check whether all tables have been checked for this release so that table-checking can be skipped. For this reason, mysql_upgrade needs to be run as a user with write access to the data directory. Problem How to test File "mysql_upgrade_info" is written and get correct timestamp and content. But this information seems to be ignored by the tool. Expected behavior Why critical? — test setup via docker-compose.yaml
—
|
| Comments |
| Comment by Daniel Black [ 2021-11-17 ] | |||||||||||||
|
tgruenert thanks for the bug report. The continued running of mysql_upgrade on every restart is odd. I don't have an explanation looking at version in the observations below:
Do you have the same? I did a little digging into how bitnami script their mysql_upgrade. This is part of the mysql_initialize (in the setup.sh script. This is completed before run.sh script is run an you have a functioning system again. The time consuming part it seems from you, (the container logs would confirm this), is the checking of all tables. Adding the following group/config option to your configuration for mariadb-upgrade would save the most time.
If you wish to do a full check, even while system is operation, you can mariadb-upgrade --skip-upgrade-system-tables or mariadb-check --check-upgrade --auto-repair --all-databases --skip-database=mysql Obviously I can't change bitnami scripts, but there's a work around for you above, and I'll learn from them for docker library's mysql_upgrade when implemented. I need more info as to why the version check on mysql_upgrade isn't working correctly. | |||||||||||||
| Comment by Thomas Gruenert [ 2021-11-17 ] | |||||||||||||
|
The workaround rocks for us and eliminate a real huge pain. Thank you Daniel! I´ve give the ticket an update with two uploaded log files from our small test system. This may help. And i´ve checked out the steps inside bitnami container as you show and indeed this is working exactly the same way on my side. What more I can do to help you? | |||||||||||||
| Comment by Daniel Black [ 2021-11-18 ] | |||||||||||||
|
So "Not a bug" is really "Not our bug" The bitnami scripts use --force in mysql_upgrade https://github.com/bitnami/bitnami-docker-mariadb/blob/master/10.5/debian-10/rootfs/opt/bitnami/scripts/libmariadb.sh#L735 which bypasses the version check. This is all the force does do. I can't see a reason for it. Recommend bugging bitnami to remove it. Adding force=0 to the config file will have no effect as the bitnami use puts force as an arguement which takes precedence. | |||||||||||||
| Comment by Thomas Gruenert [ 2021-11-18 ] | |||||||||||||
|
To keep anybody updated about the issue please follow now https://github.com/bitnami/bitnami-docker-mariadb/issues/252 | |||||||||||||
| Comment by Daniel Black [ 2023-01-30 ] | |||||||||||||
| Comment by Daniel Black [ 2023-04-28 ] | |||||||||||||
|
And regression fixed: bitnami mariadb release notes, and mariadb-galera release notes
|