Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding update procedure on startup #180

Closed
wants to merge 1 commit into from

Conversation

flavioaiello
Copy link

The entrypoint is responsible for database initialization in case no database is provided, thus it would make sense to be responsible for the database upgrade as well.

The entrypoint is responsible for database initialization in case no the is provided, thus it would also make sense to responsible as well for the database upgrade, in case a new version is provided by the docker hub.
@tianon
Copy link
Contributor

tianon commented Jul 9, 2018

I agree in theory, but in practice this implementation is going to be quite a drain on users' systems -- I think we instead need to do something similar to docker-library/mysql#416 (and frankly, I'd rather resolve that one first and copy the implementation here afterwards unless there's a compelling reason why MariaDB would have a differing implementation).

@flavioaiello
Copy link
Author

flavioaiello commented Jul 11, 2018

I fully agree that both engine variants could and should be solved in the same manner. But why checking version etc. with shell scripting if the update process is able to do same by itself?

The only difference during startup is the line below, in case the upgrade did already took place:
This installation of MySQL is already upgraded to 10.3.8-MariaDB, use --force if you still need to run mysql_upgrade,
The temporary process will be then terminated as soon the check was done. Okay I see, the difference in terms of load is that an additional process is spawn only to determine if the upgrade is required or not.

@tianon
Copy link
Contributor

tianon commented Jul 11, 2018 via email

@CReimer
Copy link

CReimer commented May 12, 2019

The issue for MySQL got closed. MySQL seems to do something like mysql_upgrade by itself on startup.

Any chance something like this gets adopted by MariaDB anytime soon?

@J0WI
Copy link
Contributor

J0WI commented Jun 22, 2019

@tianon
Copy link
Contributor

tianon commented Jun 23, 2020

Closing in favor of https://jira.mariadb.org/browse/MDEV-9394 -- this is too heavy for us to do by default (starting mysqld twice on every container startup).

See also #271, which made implementing these types of customizations in a descendent image much easier to accomplish in a reliable/maintainable way.

@tianon tianon closed this Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants