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

do not pass mariadbd arguments with whitespace to mariadb-install-db #575

Merged
merged 1 commit into from
May 17, 2024

Conversation

Alex1s
Copy link
Contributor

@Alex1s Alex1s commented May 5, 2024

Workaround for issue #574

if [[ ! "$arg" =~ [[:space:]] ]]; then
mariadbdArgs+=("$arg")
else
mysql_warn Not passing argument \'$arg\' to mariadb-install-db because mariadb-install-db does not support arguments with whitespace.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be warning or error? Warnings could be silently ignored in the automation and lead to potential failures.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if you are asking me ...
... but I would agree with you.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I consider an error as something that cannot proceed and a warning is something that might be impacting. As the original example showed there are some things that make little difference to the way mariadb-install-db processes.

Regardless I'm hoping that this is only a temporary change until the server implementation is made cleaner with some actual shell programming expertise.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I would rewrite the if:

if [[ "$arg" =~ [[:space:]] ]]; then
  warning
else
  OK
fi

seems much more simple to understand.

@grooverdan grooverdan changed the base branch from master to next May 17, 2024 08:39
@grooverdan grooverdan merged commit c86ba4c into MariaDB:next May 17, 2024
1 of 3 checks passed
# Check if the argument contains whitespace
if [[ ! "$arg" =~ [[:space:]] ]]; then
mariadbdArgs+=("$arg")
else

This comment was marked as spam.

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.

5 participants