Fix OpenSSL library loading for MariaDB authentication plugins #233
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
RTLD_GLOBALto fix plugin loading on macOS/LinuxOpenSSL_jllas explicit dependencyProblem
MariaDB authentication plugins (e.g.,
caching_sha2_password) depend on OpenSSL, but when MariaDB loads them viadlopenat runtime, the dynamic linker can't find OpenSSL because:@rpath/libssl.3.dylibas a dependencySolution
Pre-load OpenSSL libraries with
RTLD_GLOBALwhen the API module initializes. This makes OpenSSL symbols globally available to subsequently loaded libraries, allowing the plugins to find them even though the@rpathcan't resolve to the actual file location.Test plan
caching_sha2_passwordauthentication (the default)Fixes #232
@nakagami Could you please test this PR to verify it fixes the issue on your system? You can try it with:
🤖 Generated with Claude Code