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

my_print_defaults --defaults-extra-file does not work in 10.5 and later

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.5.10, 10.5.11, 10.6.4
    • Fix Version/s: 10.5.12
    • Component/s: Scripts & Clients
    • Labels:
    • Environment:
      openSUSE Tumbleweed, SUSE Linux Enterprise Server 15 SP3

      Description

      my_print_defaults --defaults-extra-file=/etc/mynode1.cnf doesn't read the extra file starting form version 10.5. The extra file contains the datadir; the output from my_print_defaults is used by the SUSE script mysql-systemd-helper. Missing datadir, this script will run mysql_install_db on a fallback directory, causing errors when mariadb is started.

      I have tested this on mariadb version 10.5.10 and 10.6.4 on Tumbleweed and version 10.5.11 on SUSE Linux Enterprise Server 15 SP3.

      To test I have created a file /etc/mynode1.cnf:

      [mysqld]
      port = 3310
      datadir = /var/lib/mysql/node1/databases
      pid-file = /var/lib/mysql/node1/databases/mysqld.pid
      socket = /run/mysql/node1mysql.sock
      log-error = /var/log/mysql/node1/mysqld.log
      secure_file_priv = /var/lib/mysql-files

      Then run the following command:

      /usr/bin/my_print_defaults mysqld mysqld_multi "node1" --defaults-file=/etc/mynode1.cnf

      On mariadb 10.4 my_print_defaults print the following output:

      // default options, left out
      --port=3310
      --datadir=/var/lib/mysql/node1/databases
      --pid-file=/var/lib/mysql/node1/databases/mysqld.pid
      --socket=/run/mysql/node1mysql.sock
      --log-error=/var/log/mysql/node1/mysqld.log
      --secure_file_priv=/var/lib/mysql-files

      On newer version, starting from 10.5, the options from the extra files are left out.

      I have read the diff for mysys/my_default.c between branch 10.4 and branch 10.5, it seems to me that it has been completely rewritten. The "Upgrading from 10.4 to 10.5" page doesn't refer this change, so this could potentially be a newly introduced bug.

        Attachments

          Activity

            People

            Assignee:
            rucha174 Rucha Deodhar
            Reporter:
            danyspin97 Danilo Spinella
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration