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

mariadbd-multi: [mariadbd_multi] in an earlier option file overrides [mysqld_multi] in a later one

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 13.3
    • 13.3
    • Scripts & Clients
    • None
    • Not for Release Notes

    Description

      A setting in /.my.cnf should win over the same setting in a global option file, because /.my.cnf is read after the global option files. In the test case below, the global file sets log= in [mariadbd_multi], and /.my.cnf sets a different log= in [mysqld_multi]. mariadbd-multi writes to the log file from the global file and ignores the log= from /.my.cnf.

      With the same group name in both files ([mariadbd_multi] in /.my.cnf as well), the log= from /.my.cnf is used.

      BASEDIR=/test/mtest/MDEV-42003/MD031126-mariadb-13.2.0-linux-x86_64-opt
      TMPDIR=/tmp/testdir 
      mkdir -p $TMPDIR/global $TMPDIR/user
      export PATH=$BASEDIR/bin:$PATH MYSQL_HOME=$TMPDIR/global HOME=$TMPDIR/user
       
      # Global option file ($MYSQL_HOME/my.cnf), read first
      cat > $TMPDIR/global/my.cnf <<EOC
      [mariadbd_multi]
      log=$TMPDIR/global/multi.log
      [mysqld2]
      socket=$TMPDIR/s2
      EOC
       
      # User option file (~/.my.cnf), read last, so its log= should win
      cat > $TMPDIR/user/.my.cnf <<EOC
      [mysqld_multi]
      log=$TMPDIR/user/multi.log
      EOC
       
      mariadbd-multi --silent report 2 >/dev/null
      for f in global user; do [ -e $TMPDIR/$f/multi.log ] && echo "$f log: written" || echo "$f log: not written"; done
       
      # Cleanup
      rm -rf $TMPDIR
      

      Actual result

      global log: written
      user log: not written
      

      Expected result

      global log: not written
      user log: written
      

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 0.5h
                  0.5h

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.