Skip to content

Commit 7bf4095

Browse files
vaintroubvuvova
authored andcommitted
MDEV-11660 Make encryption plugins "pure"
Do not exporting mysqld entry points directly. This is needed for mariabackup, to load encryption plugins on Windows. All plugins are "pure" by default. To mark plugin "impure" it should use RECOMPILE_FOR_EMBEDDED or STORAGE_ENGINE keyword.
1 parent db39107 commit 7bf4095

File tree

17 files changed

+182
-147
lines changed

17 files changed

+182
-147
lines changed

cmake/plugin.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,15 @@ MACRO(MYSQL_ADD_PLUGIN)
201201
# executable to the linker command line (it would result into link error).
202202
# Thus we skip TARGET_LINK_LIBRARIES on Linux, as it would only generate
203203
# an additional dependency.
204-
IF(NOT ARG_CLIENT)
204+
IF(ARG_RECOMPILE_FOR_EMBEDDED OR ARG_STORAGE_ENGINE)
205205
IF(MSVC)
206206
ADD_DEPENDENCIES(${target} gen_mysqld_lib)
207207
TARGET_LINK_LIBRARIES(${target} mysqld_import_lib)
208208
ELSEIF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
209209
TARGET_LINK_LIBRARIES (${target} mysqld)
210210
ENDIF()
211+
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
212+
TARGET_LINK_LIBRARIES (${target} "-Wl,--no-undefined")
211213
ENDIF()
212214

213215
IF(ARG_LINK_LIBRARIES)

mysql-test/suite/encryption/r/filekeys_syntax.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ select plugin_status from information_schema.plugins
2828
where plugin_name = 'file_key_management';
2929
plugin_status
3030
install soname 'file_key_management';
31-
ERROR HY000: Invalid key id at MYSQL_TMP_DIR/keys.txt line 2, column 11
31+
ERROR HY000: Invalid key id at MYSQL_TMP_DIR/keys.txt line 2, column 10
3232
call mtr.add_suppression("Invalid key id");
3333
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
3434
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");

plugin/auth_dialog/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@
1515
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1616

1717
ADD_DEFINITIONS(-DNO_GET_TTY_PASSWORD)
18+
IF(LIBDL)
19+
SET(LLDL LINK_LIBRARIES dl)
20+
ENDIF()
1821
MYSQL_ADD_PLUGIN(dialog dialog.c ${CMAKE_SOURCE_DIR}/libmysql/get_password.c
19-
MODULE_ONLY CLIENT COMPONENT ClientPlugins)
22+
MODULE_ONLY CLIENT ${LLDL} COMPONENT ClientPlugins)

0 commit comments

Comments
 (0)