Skip to content

Commit 6488653

Browse files
committed
cmake: Update bundled plugins checks to handle the native password plugin
1 parent 49f9716 commit 6488653

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

jdbc/CMakeLists.txt

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -478,14 +478,11 @@ endif()
478478

479479
# additional client-side plugins (if any)
480480
#
481-
# FIXME: The standard build of the client library uses mysql_native_password
482-
# plugin to implement native password authentication. We should bundle that
483-
# plugin if it is present. But currently we build connector with a modified
484-
# client library that has the plugin built-in and does not ship it as a separate
485-
# module. Therefore we can't specify it here because the plugins check would
486-
# complain about missing plugin.
481+
# Note: The native password authentication plugin is not listed in AUTH_PLUGIN
482+
# list because its name does not follow the common auth_XXX_client pattern
483+
#
487484

488-
set(PLUGINS)
485+
set(PLUGINS mysql_native_password)
489486

490487
# additional bundled dependencies of the client library other than the openssl
491488
# libraries that are handled separately (in DepFindSSL.cmake)
@@ -807,7 +804,18 @@ if(BUNDLE_DEPENDENCIES)
807804
if(MAINTAINER_MODE)
808805

809806
foreach(plugin ${PLUGINS})
810-
message(SEND_ERROR "known client-side plugin not found and not bundled: ${plugin}")
807+
808+
# Note: In some RE builds we use a modified build of the client library
809+
# which does not ship the native password authentication plugin but has
810+
# it built-in. Therefore we don't complain if the plugin was not found
811+
# assuming that in this case it is built-in and needs not to be bundled.
812+
813+
if(NOT plugin STREQUAL "mysql_native_password")
814+
message(SEND_ERROR
815+
"known client-side plugin not found and not bundled: ${plugin}"
816+
)
817+
endif()
818+
811819
endforeach()
812820

813821
foreach(plugin ${IGNORED_PLUGINS})

0 commit comments

Comments
 (0)