[MDEV-7341] mysqld_multi doesn't recognize include directive (not following includes) Created: 2014-12-18  Updated: 2015-12-08  Resolved: 2015-12-08

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 5.1.67, 5.2.14, 5.3.12, 5.5, 10.0
Fix Version/s: 5.5.47, 10.0.23, 10.1.10

Type: Bug Priority: Major
Reporter: Alex Assignee: Sergei Golubchik
Resolution: Fixed Votes: 1
Labels: upstream

Attachments: File mariadb-5.5.41-musqld_multi-includedir.diff    

 Description   

Hello,
we have multi-mariadb environments and decided to split my.cnf into few smaller configs for easier management and configuration support
However, it came to my attention that mysqld_multi doesn't support includes, or in simple words - doesn't "respect" include setting in my.cnf
This seems to be a very old behavior, since mysql 5.0
http://bugs.mysql.com/bug.php?id=29327

Some patches exist but I'd like to avoid patching it, better have it that functionality out of the box

So wanted to ask if you can fix it

Thanks!
Alex



 Comments   
Comment by Elena Stepanova [ 2014-12-18 ]

Do you want to provide (contribute) a patch which we could apply? It would probably go much faster this way.

Comment by Alex [ 2014-12-19 ]

Hi Elena,
Thanks for replying!

The patch was provided by one of the aforementioned task's commentators
http://bugs.mysql.com/file.php?id=17400&bug_id=29327
I haven't tested it but it looks like a simplest one, so should work.
It adds just few more lines to cover both RedHat and Debian include paths (not sure about Debian though cause I am CentOS user)

The only thing is that it's strictly searching under /etc/mysql.d/ path for *.cnf (in CentOS). (Maybe someone wants to have it under a different dir?)
So probably looking for includedir in my.cnf is desirable. But I would stay with default as is, after all it's FHS compliant

I don't mind if this patch will be included since that's the dir path I anyway planned to use and obviously my files would have *.cnf extension

Thanks!

p.s. found many reports about mysqld_multi include problem here and there, even on Percona forums
I hope MariaDB can finally make it happen!

Comment by Elena Stepanova [ 2014-12-19 ]

It doesn't look like a real fix for the non-working directive problem, does it?
Maybe I'm missing something, I'll leave it to serg to decide if it's a proper patch and whether it can be included.

Comment by Alex [ 2015-01-06 ]

Yes, you are right, it doesn't look like the fix. more than that it doesn't work.
I am including patch we wrote (and that works)

What it does:

  • scans all found cnf files for !includedir
  • scans for *.cnf in !includedir directory
  • adds those files to previously found my.cnf (.my.cnf) files
  • passes all files to find_groups

note:

  • it doesn't look for more !includedir directives in files found
  • it doesn't parse !include (for single files)

Hope it helps and can be polished/included and finally released

Thanks!

Generated at Thu Feb 08 07:18:51 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.