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

MDEV-21375: Get option group suffix from $MARIADB_GROUP_SUFFIX in addition to $MYSQL_GROUP_SUFFIX #3787

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amarjilani
Copy link

Description

Currently, if the --default-group-suffix argument is not passed when initializing
an instance of MariaDB, the MYSQL_GROUP_SUFFIX environment variable, if set, is used to specify the group suffix.

Add an additional check for the MARIADB_GROUP_SUFFIX environment variable before checking for MYSQL_GROUP_SUFFIX. This environment variable will take precedence over the MYSQL_GROUP_SUFFIX if both are set, with the goal of furthering MariaDB's branding.

This behaviour is consistent with how MARIADB_HOME is checked before MYSQL_HOME (MDEV-21365).

Release Notes

N/A

How can this PR be tested?

Create a custom config file with at least two different suffix groups.
For example:
test.cnf

[mysqld]
max_connections=100

[mysqld_test1]
max_connections=300

[mysqld_test2]
max_connections=500

Set the MARIADB_GROUP_SUFFIX and MYSQL_GROUP_SUFFIX environment variables:

export MARIADB_GROUP_SUFFIX=_test1
export MYSQL_GROUP_SUFFIX=_test2

Start the server, passing in the config file:

./build/sql/mariadbd --defaults-file=./my-test.cnf --datadir=./data --user=username &

Run the client:

./build/client/mariadb -u root

Run the appropriate query:

MariaDB [(none)]> SHOW VARIABLES LIKE 'max_connections';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 300   |
+-----------------+-------+

Basing the PR against the correct MariaDB version

  • This is a new feature and the PR is based against the latest MariaDB development branch.

Copyright

All new code of the whole pull request, including one or several files that are
either new files or modified ones, are contributed under the BSD-new license. I
am contributing on behalf of my employer Amazon Web Services, Inc.

…ition to $MYSQL_GROUP_SUFFIX

Add check for MARIADB_GROUP_SUFFIX environment variable when
--default-group-suffix argument is not passed. This environment variable
will take precedence over the MYSQL_GROUP_SUFFIX environment variable if
both are set.

All new code of the whole pull request, including one or several files that are
either new files or modified ones, are contributed under the BSD-new license. I
am contributing on behalf of my employer Amazon Web Services, Inc.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@cvicentiu cvicentiu added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements.
Development

Successfully merging this pull request may close these issues.

4 participants