|
When the server parses my.cnf or other option/configuration files, dashes and underscores are interchangeable in options:
Dashes (-) and underscores (_) in options are interchangeable.
https://mariadb.com/kb/en/library/configuring-mariadb-with-option-files/#option-file-syntax
This is not the case with MariaDB Connector/C:
Unlike with the server, dashes (-) and underscores (_) in options are not interchangeable for MariaDB Connector/C. Options must be specified exactly as they are defined.
https://mariadb.com/kb/en/library/configuring-mariadb-connectorc-with-option-files/#option-file-syntax
I think it would be pretty easy to fix this.
One potential fix would be to modify the _mariadb_set_conf_option function, so that it makes a copy of the config_option C-string argument and replaces all underscores (_) with dashes (-) before doing the strcmp:
https://github.com/MariaDB/mariadb-connector-c/blob/1285dc72a043f09d9a51abcfc3a4fbfb5192067e/libmariadb/mariadb_lib.c#L696
|