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

Mismatch in MARIADB_UNIX_ADDR default value for MariaDB Server and Connector C

    XMLWordPrintable

    Details

      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.

        Attachments

          Activity

            People

            Assignee:
            danblack Daniel Black
            Reporter:
            otto Otto Kekäläinen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration