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

docs inaccuracy for MARIADB_DISABLE_UPGRADE_BACKUP #441

Open
mirekphd opened this issue Jun 17, 2022 · 1 comment
Open

docs inaccuracy for MARIADB_DISABLE_UPGRADE_BACKUP #441

mirekphd opened this issue Jun 17, 2022 · 1 comment

Comments

@mirekphd
Copy link

MariaDB docs (on Docker Hub here and at mariadb.com here) for MARIADB_DISABLE_UPGRADE_BACKUP are inaccurate (inconsistent with the current code):

Docs:

This backup process can be disabled with by setting MARIADB_DISABLE_UPGRADE_BACKUP to a non-empty value."

(e.g. https://hub.docker.com/_/mariadb)

vs. code:

{
	if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \
		&& [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then
		mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting"
		return

[ https://github.com/MariaDB/mariadb-docker/blob/master/docker-entrypoint.sh#L369 ]

Note also this issue, which affects multiple places (see list):

= and == are for string comparisons
-eq is for numeric comparisons

[ https://stackoverflow.com/a/20449556/9962007 ]

grooverdan added a commit to grooverdan/mariadb-docker that referenced this issue Jun 17, 2022
Like all the other environment variables.

Closes MariaDB#441.
@martadinata666
Copy link

martadinata666 commented Jun 17, 2022

The problem here is "non empty value" , when usually we expect 1 as true, like MARIADB_AUTO_UPGRADE case. The #442 will result anything filled to the MARIADB_DISABLE_UPGRADE_BACKUP will be true. Imho, i prefer update documentation to set this ENV to 1 to enable this behaviour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants