Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-396

!includedir in my.cnf does not include all .cnf and .ini files in the directory

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.8
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      When the server parses my.cnf or other option/configuration files, it interprets the !includedir directive to mean that it should include all .cnf and .ini files in the directory:

      It is also possible to include all option files in a directory from another option file. For example, to include all option files in /etc/my.cnf.d/, an option file could contain:

      [mariadb]
      ...
      !includedir /etc/my.cnf.d/

      The option files within the directory are read in alphabetical order.

      All option file names must end in .cnf on Unix-like operating systems. On Windows, all option file names must end in .cnf or .ini.

      https://mariadb.com/kb/en/library/configuring-mariadb-with-option-files/#including-option-file-directories

      This is not the case with MariaDB Connector/C:

      It is also possible to include the default option files in a directory from another option file. For example, to include the default option files in /etc/my.cnf.d/, an option file could contain:

      [client-mariadb]
      ...
      !includedir /etc/my.cnf.d/

      Unlike with MariaDB server, this directive does not configure MariaDB Connector/C to include all option files ending in .cnf on Unix-like operating systems or all option files ending in .cnf and .ini files on Windows. Instead, it just configures MariaDB Connector/C to include the my.cnf in the given directory, and also the my.ini in the given directory if it's Windows.

      https://mariadb.com/kb/en/library/configuring-mariadb-connectorc-with-option-files/#including-option-file-directories

      This can be seen here:

      https://github.com/MariaDB/mariadb-connector-c/blob/1285dc72a043f09d9a51abcfc3a4fbfb5192067e/libmariadb/ma_default.c#L196

      https://github.com/MariaDB/mariadb-connector-c/blob/1285dc72a043f09d9a51abcfc3a4fbfb5192067e/libmariadb/ma_default.c#L328

      We might want to change this, so that it reads all .cnf and .ini files in the directory, so that MariaDB Connector/C handles !includedir more like MariaDB Server.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              georg Georg Richter
              Reporter:
              GeoffMontee Geoff Montee
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: