Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-7341

mysqld_multi doesn't recognize include directive (not following includes)

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.1.67, 5.2.14, 5.3.12, 10.0, 5.5
    • Fix Version/s: 10.0, 5.5
    • Component/s: None
    • Labels:

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              elenst Elena Stepanova added a comment -

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

              Show
              elenst Elena Stepanova added a comment - Do you want to provide (contribute) a patch which we could apply? It would probably go much faster this way.
              Hide
              ShivaS Alex added a comment -

              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!

              Show
              ShivaS Alex added a comment - 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!
              Hide
              elenst Elena Stepanova added a comment -

              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 Sergei Golubchik to decide if it's a proper patch and whether it can be included.

              Show
              elenst Elena Stepanova added a comment - 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 Sergei Golubchik to decide if it's a proper patch and whether it can be included.
              Hide
              ShivaS Alex added a comment -

              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!

              Show
              ShivaS Alex added a comment - 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!

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  ShivaS Alex
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated: