24#ifndef MYSQL_SERVER_DYNAMIC_LOADER_SCHEMA_FILE_H
25#define MYSQL_SERVER_DYNAMIC_LOADER_SCHEMA_FILE_H
33#include <unordered_set>
36#define dlsym(lib, name) (void *)GetProcAddress((HMODULE)lib, name)
37#define dlopen(libname, unused) LoadLibraryEx(libname, NULL, 0)
38#define dlclose(lib) FreeLibrary((HMODULE)lib)
39#define RTLD_NOW 0x00002
40#define DLERROR_GENERATE(errmsg, error_number) \
41 char win_errormsg[2048]; \
42 if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0, error_number, 0, \
43 win_errormsg, 2048, NULL)) { \
45 for (ptr = &win_errormsg[0] + strlen(win_errormsg) - 1; \
46 ptr >= &win_errormsg[0] && strchr("\r\n\t\0x20", *ptr); ptr--) \
48 errmsg = win_errormsg; \
52#define dlopen_errno GetLastError()
56#ifndef MYSQL_ABI_CHECK
61#define DLERROR_GENERATE(errmsg, error_number) errmsg = dlerror()
62#define dlopen_errno errno
Definition: dynamic_loader_scheme_file_imp.h:65
static mysql_rwlock_t LOCK_dynamic_loader_scheme_file
Definition: dynamic_loader_scheme_file_imp.h:71
static void deinit()
De-initializes RW lock, all other structures doesn't require any action.
Definition: dynamic_loader_scheme_file.cc:79
static mysql_service_status_t unload(const char *urn) noexcept
Unloads file that was previously loaded.
Definition: dynamic_loader_scheme_file.cc:204
static void init()
Initializes file:// scheme for dynamic loader for usage.
Definition: dynamic_loader_scheme_file.cc:70
std::map< std::string, void * > my_registry
Definition: dynamic_loader_scheme_file_imp.h:66
static my_registry object_files_list
Definition: dynamic_loader_scheme_file_imp.h:69
static std::unordered_set< list_components_func > library_entry_set
Definition: dynamic_loader_scheme_file_imp.h:70
static mysql_service_status_t load(const char *urn, mysql_component_t **out_data) noexcept
Loads components that are located in executable file specified by URN.
Definition: dynamic_loader_scheme_file.cc:99
Specifies macros to define Components.
Specifies macros to define Service Implementations.
#define DEFINE_BOOL_METHOD(name, args)
A short macro to define method that returns bool, which is the most common case.
Definition: service_implementation.h:88
Carries information on the specific Component, all Service Implementations it provides,...
Definition: dynamic_loader.h:263
An instrumented rwlock structure.
Definition: mysql_rwlock_bits.h:51