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

Update mtr test using select @@datadir to use MARIADB_DATADIR

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • Tests
    • None

    Description

      This task to replace all 'select @@datadir' usage to $MARIADB_DATADIR and $MARIADB_TOPDIR.

      Background:
      In mtr, there is a lot of calls to select @@datadir that is used to for two different things:

      • To find out where MariaDB stores it databases and tables and modify them.
      • Accessing files that are stored in the top data directory, like mariadb_upgrade_info,
        master-bin.* and other master/slave related files.

      In 11.3 with catalogs the two paths are different as databases are stored inside the
      catalog directory.
      This is solved in 11.3 mtr by having two variables, initialized in mtr:
      $MARIADB_TOPDIR The data directory (Basically select @@datadir)
      $MARIADB_DATADIR The directory of the current catalog. When catalogs are used this is $MARIADB_TOPDIR/catalog. When catalogs are not used it is same as $MARIADB_TOPDIR.

      Doing this change in 10.6 will:

      • Make the codebase more uniform (there is a lot of different variables used for the same things).
      • Make the code a bit shorter (not much but still counts)
      • Make it easier to merge tests up to 11.3
      • Make it easier to back port catalogs to 10.6 and 10.11 (if we would desire to do that).

      This change is already done in the 'maria-cat' branch, in the "mtr --catalogs" commit.

      The task is to backport all test changes related to the usage of $MARIADB_DATADIR and $MARIADB_TOPDIR

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              monty Michael Widenius
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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