Details
Description
From https://github.com/MariaDB/mariadb-docker/issues/350
Its causing problems for users https://github.com/AzuraCast/docker-azuracast-db/issues/3
If we have a healthcheck (MDEV-25434), then we'll need to ensure that only returns health after mysql_upgrade is run.
" the most difficult problem is detection of when it ought to be run because it requires the server to be up before it can run (so it requires the same temporary server logic as the initial bootstrapping), so it isn't reasonable to just run it every time"
Maybe a direct inspection of the FRM format in MDEV-23008
Attachments
Issue Links
- relates to
-
MDEV-23008 store mysql_upgrade version info in system table instead of local file
-
- Open
-
-
MDEV-25434 mariadb container to have HEALTHCHECK
-
- Closed
-
- links to
As MDEV-23008 describes, when mysql_upgrade runs, it creates mysql_upgrade_info file in the data directory. The file contains the server version on which mysql_upgrade was run.
This file is used by mysql_upgrade itself to determine whether it should run again. It only runs if the file doesn't exist, or the version doesn't match the current one (or if it's started with --force, but that's irrelevant).
So, the same criteria can be used here.
It may be imperfect (as MDEV-23008 also describes), but it should be sufficient here, as the most arguments from MDEV-23008 don't apply to the use case.
Besides, MDEV-23008 probably won't be implemented any time soon (if ever).