Blame SOURCES/mysql-rpath.patch

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