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.
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.
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: