[MDEV-32092] The --group option in mariadb-install-db behaves differently from other CLI options Created: 2023-09-04  Updated: 2023-09-05

Status: Open
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.6.15
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: markus makela Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

mariadb:10.6.15 docker image



 Description   

With -group root, the option is misinterpreted as a server option. With -group=root the option works as expected.

root@monolith:/# mariadb-install-db --datadir=/tmp/mysql123 --skip-test-db --user=root --group root
Installing MariaDB/MySQL system tables in '/tmp/mysql123' ...
2023-09-04 20:27:01 0 [ERROR] Unknown suffix 'r' used for variable 'group_concat_max_len' (value 'root')
2023-09-04 20:27:01 0 [ERROR] /usr/sbin/mariadbd: Error while setting value 'root' to 'group_concat_max_len'

This is technically correct behavior as the --help output does use an equals sign in the option documentation:

  --group=group_name   The login group to use for running mysqld.  Files and
                       directories created by mysqld will be owned by this
                       group. You must be root to use this option.  By default
                       mysqld runs using your current group and files and
                       directories that it creates will be owned by you.

However, the error message is confusing and makes it hard to figure out what exactly is causing the error.

This also breaks the usual expectation in MariaDB command line tools that the equals sign between an option and its value is optional. This is how for example mariadb and mariadb-admin behave.


Generated at Thu Feb 08 10:28:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.