[Maria-discuss] Dots in filenames of configuration files - !includedir weirdness
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. Is this a bug that should be reported? 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-... Thanks, Geoff Montee
Hi! On Fri, Oct 24, 2014 at 6:54 AM, Geoff Montee <geoff.montee@gmail.com> 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-...
Thanks,
Geoff Montee
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
On Fri, Oct 24, 2014 at 10:35 AM, Nirbhay Choubey <nirbhay@mariadb.com> wrote:
On Fri, Oct 24, 2014 at 6:54 AM, Geoff Montee <geoff.montee@gmail.com> wrote:
Is this a bug that should be reported?
IMO it is, please do.
Thanks!
-- Nirbhay
Thanks for the reply! I'll submit the bug to the MariaDB issue tracker. I've just reproduced this bug on Oracle MySQL 5.6, so I will also submit the bug to them. Geoff
On Fri, Oct 24, 2014 at 10:44 AM, Geoff Montee <geoff.montee@gmail.com> wrote:
I'll submit the bug to the MariaDB issue tracker. I've just reproduced this bug on Oracle MySQL 5.6, so I will also submit the bug to them.
Bugs reported. Oracle MySQL: http://bugs.mysql.com/bug.php?id=74551 MariaDB: https://mariadb.atlassian.net/browse/MDEV-6939 Geoff
participants (2)
-
Geoff Montee
-
Nirbhay Choubey