Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Minor
-
Resolution: Not a Bug
-
Affects Version/s: 10.6.4
-
Fix Version/s: N/A
-
Component/s: Configuration, libmariadb
-
Labels:None
Description
While working on MariaDB 10.6.4 compilation I noticed this warning:
$ eatmydata ninja package
|
[27/50] Building C object client/CMakeFiles/mariadb-upgrade.dir/mysql_upgrade.c.o
|
...
|
In file included from ../client/mysql_upgrade.c:19:
|
In file included from ../client/client_priv.h:27:
|
include/mysql_version.h:23:9: warning: 'MARIADB_UNIX_ADDR' macro redefined [-Wmacro-redefined]
|
#define MARIADB_UNIX_ADDR "/var/lib/mysql/mysql.sock"
|
^
|
../libmariadb/include/mariadb_version.h:17:9: note: previous definition is here
|
#define MARIADB_UNIX_ADDR "/tmp/mysql.sock"
|
...
|
It is understanable that the variable is defined twice, but it is not good that we have two different default values of MARIADB_UNIX_ADDR.
The client sets it to /tmp/mysql.sock in https://github.com/mariadb-corporation/mariadb-connector-c/blob/1f320a663cf08191e3be03be11bd61c7560b0cb7/CMakeLists.txt#L181
The server sets MARIADB_UNIX_ADDR to MYSQL_UNIX_ADDR which in turn is set to INSTALL_UNIX_ADDRDIR which ends up being /var/lib/mysql in the build.
I suggest the default path would be the same in both projects.