Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
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
- is part of
-
MDEV-31542 Add multi-tenancy catalogs to MariaDB
- Stalled