MySQL Forums
Forum List  »  Optimizer & Parser

Re: Preparse Query Rewrite Plugin DLL
Posted by: Tor Didriksen
Date: September 15, 2016 01:40AM

you need to build your plugin together with the server.
MYSQL_ADD_PLUGIN is defined in one of our .cmake scripts.
That macro does several things, including this, to fix linkage issues on windows:

# Plugin uses symbols defined in mysqld executable.
# Some operating systems like Windows and OSX and are pretty strict about
# unresolved symbols. Others are less strict and allow unresolved symbols
# in shared libraries. On Linux for example, CMake does not even add
# executable to the linker command line (it would result into link error).
# Thus we skip TARGET_LINK_LIBRARIES on Linux, as it would only generate
# an additional dependency.
# Use MYSQL_PLUGIN_IMPORT for static data symbols to be exported.
IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
TARGET_LINK_LIBRARIES (${target} mysqld ${ARG_LINK_LIBRARIES})
ENDIF()

i.e. the plugin is linked agains 'mysqld'
which has a .def file which exports the symbols found in the server.

Options: ReplyQuote


Subject
Views
Written By
Posted
2092
August 12, 2016 05:16PM
781
September 08, 2016 02:23AM
1138
September 14, 2016 07:04PM
Re: Preparse Query Rewrite Plugin DLL
854
September 15, 2016 01:40AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.