• Vladislav Vaintroub's avatar
    MDEV-22214 mariadbd.exe calls function mysqld.exe, and crashes · 93efbc39
    Vladislav Vaintroub authored
    Stop linking plugins to the server executable on Windows.
    Instead, extract whole server functionality into a large DLL, called
    server.dll. Link both plugins, and small server "stub" exe to it.
    
    This eliminates plugin dependency on the name of the server executable.
    It also reduces the size of the packages (since tiny mysqld.exe
    and mariadbd.exe are now both linked to one big DLL)
    
    Also, simplify the functionality of exporing all symbols from selected
    static libraries. Rely on WINDOWS_EXPORT_ALL_SYMBOLS, rather than old
    self-backed solution.
    
    fix compile error
    
    replace GetProcAddress(GetModuleHandle(NULL), "variable_name")
    for server exported data with actual variable names.
    
    Runtime loading was never required,was error prone
    , since symbols could be missing at runtime, and now it actually failed,
    because we do not export symbols from executable anymore, but from a shared
    library
    
    This did require a MYSQL_PLUGIN_IMPORT decoration for the plugin...
    93efbc39
install_macros.cmake 8.2 KB