[MDEV-27126] my_getopt compares option names case sensitively Created: 2021-11-26  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: Configuration
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Hartmut Holzgraefe Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 1
Labels: beginner-friendly


 Description   

We have a few server configuration options like e.g. wsrep_slave_UK_checks and wsrep_slave_FK_checks that unfortunately use a mix of lower and upper case letters.

As the vast majority of option names only uses lower case letters it often happens that one e.g. types wsrep_slave_fk_checks all lower case, and ends up with startup failures due to "Unknown option" errors.

As it is probably too late to rename the options by now, and as I am not aware of any two option names that only differ in letter case, I'd suggest to make option name lookups and comparisons case insensitive. As SQL level "SET variable=..." is case insensitive already anyway that would actually improve consistency in option name handling

Alternatively: identify all existing mix cased options, and create all-lower-case aliases for them?



 Comments   
Comment by Sergei Golubchik [ 2021-11-26 ]

Option names must be compared case-insensitively, because variable names do:

MariaDB [test]> set @@AuToCoMmIt=0;
Query OK, 0 rows affected (0.00 sec)

Comment by BINSHUO ZU [ 2022-04-08 ]

Hi, I'm new to this community I'm interested in this issue and want to know whether I can fix it. Are there more info for me to handle it?

Comment by Sergei Golubchik [ 2022-04-08 ]

Not really. If the info about is not sufficient, you can ask a specific question.
Also, you might want to take a look at https://mariadb.org/contribute/

Comment by Weijun Huang [ 2022-04-09 ]

I think that creating all-lower-case aliases for them for existing mix cased options is the easiest way to fix this bug. I can try to handle it.

Generated at Thu Feb 08 09:50:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.