Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
3.4.9
-
None
Description
MDEV-37527 (commit afb56859) added -fvisibility=hidden to all plugin builds and introduced the MARIADB_CLIENT_PLUGIN_EXPORT macro to explicitly export mysql_client_plugin_declaration from each plugin.
plugins/compress/c_zstd.c was missed — every other plugin file was updated, but c_zstd.c still declares:
MARIADB_COMPRESSION_PLUGIN mysql_client_plugin_declaration =
instead of:
MARIADB_CLIENT_PLUGIN_EXPORT MARIADB_COMPRESSION_PLUGIN mysql_client_plugin_declaration =
With -fvisibility=hidden in effect, the symbol is hidden at compile time. The --dynamic-list linker flag cannot re-export it because the compiler has already marked it as local. Result: zstd.so exports zero symbols and cannot be loaded
via dlsym().
Verified against built Fedora 45 RPMs:
- 3.4.8 zstd.so: exports mysql_client_plugin_declaration (plus 2 internal symbols)
- 3.4.9 zstd.so: exports nothing — nm -D --defined-only returns empty
The bug is still present on the 3.4 branch tip (3.4.10-dev, commit a98a068).