-
Georgi Kodinov authored
When the server loads a plugin it searches for globals of the plugin services the plugin may be using. If found it expects a version in these globals, checks the version and if it matches replaces it with a pointer to the server function implementing the service. It does not save these versions and thus does not restore them when unloading the plugin, as it expects that the dynamic library will go away. However if the same shared library also exports UDF functions the reference count to it may not be zero and UNINSTALL PLUGIN will not actually unload the shared library. So the next INSTALL PLUGIN will find the shared library, but will fail when checking the service versions since these are already replaced by the server function pointers. Fixed by accepting the relevant server function pointer as a valid value for the version in addition to the actual version as checked currently. Test case added.
Georgi Kodinov authoredWhen the server loads a plugin it searches for globals of the plugin services the plugin may be using. If found it expects a version in these globals, checks the version and if it matches replaces it with a pointer to the server function implementing the service. It does not save these versions and thus does not restore them when unloading the plugin, as it expects that the dynamic library will go away. However if the same shared library also exports UDF functions the reference count to it may not be zero and UNINSTALL PLUGIN will not actually unload the shared library. So the next INSTALL PLUGIN will find the shared library, but will fail when checking the service versions since these are already replaced by the server function pointers. Fixed by accepting the relevant server function pointer as a valid value for the version in addition to the actual version as checked currently. Test case added.
Loading