Blame SOURCES/mysql-rpath.patch

4522a4
MySQL 8.0 includes a feature that requires we set linux NICE capabilities to
4522a4
mysqld daemon. Because of that, LD_LIBRARY_PATH does not work (see
4522a4
secure-execution mode in http://man7.org/linux/man-pages/man8/ld.so.8.html).
4522a4
4522a4
Related: #1628814
4522a4
4522a4
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
4522a4
index 3f179a7a..209b3eb2 100644
4522a4
--- a/sql/CMakeLists.txt
4522a4
+++ b/sql/CMakeLists.txt
4522a4
@@ -918,6 +918,8 @@ IF(UNIX_INSTALL_RPATH_ORIGIN_PRIV_LIBDIR)
4522a4
   ADD_INSTALL_RPATH_FOR_PROTOBUF(mysqld)
4522a4
 ENDIF()
4522a4
 
4522a4
+SET_TARGET_PROPERTIES(mysqld PROPERTIES INSTALL_RPATH "${RPATH_LIBDIR}")
4522a4
+
4522a4
 OPTION(DEBUG_EXTNAME "Build server as mysqld-debug (debug builds only)" OFF)
4522a4
 MARK_AS_ADVANCED(DEBUG_EXTNAME)
4522a4