← Back to team overview

maria-discuss team mailing list archive

Re: Dots in filenames of configuration files - !includedir weirdness

 

Hi!

On Fri, Oct 24, 2014 at 6:54 AM, Geoff Montee <geoff.montee@xxxxxxxxx>
wrote:

> I've noticed some strange behavior that might be a bug in the current
> implementation of the !includedir directive for my.cnf files. I wanted to
> get the opinion of the MariaDB community on whether this is working as
> intended before reporting it.
>
> Let's say I have a line like the following in /etc/my.cnf:
>
> !includedir /home/mysql/conf
>
> MariaDB should load any configuration variables from files with the
> extension ".cnf" in that directory. The problem I ran into is that MariaDB
> appears to determine the extension based on the first dot ('.') in the
> filename. If I have a file with a full path like this:
>
> /home/mysql/conf/mariadb10.0-galera.cnf
>
> MariaDB appears to think that the extension of the file is 0-galera.cnf,
> so it won't load it.
>
> If the file is renamed to something like this (with no extra dots):
>
> /home/mysql/conf/mariadb10-0-galera.cnf
>
> MariaDB properly loads the configuration file.
>

Right. In order to fetch the correct extension the logic should look for
last occurrence
of file extension character ('.') instead.


> Is this a bug that should be reported?
>

IMO it is, please do.

Thanks!

-- Nirbhay


> System info:
> OS: RHEL 6
> Arch: x86_64
> MariaDB build: MariaDB Galera Cluster 10.0.14, built from source
>
> Slightly related note: I don't see any documentation on the !includedir
> directive in the MariaDB knowledgebase. I would expect to see some mention
> of it here:
>
>
> https://mariadb.com/kb/en/mariadb/documentation/getting-started/configuring-mariadb-with-mycnf/
>
> Thanks,
>
> Geoff Montee
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~maria-discuss
> Post to     : maria-discuss@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References