96
string plugin_decl_sym("_drizzled_");
97
plugin_decl_sym.append(plugin_name);
98
plugin_decl_sym.append("_plugin_");
98
100
/* Find plugin declarations */
99
void *sym= dlsym(handle, plugin_declarations_sym);
101
void *sym= dlsym(handle, plugin_decl_sym.c_str());
102
104
const char* errmsg= dlerror();
103
105
errmsg_printf(ERRMSG_LVL_ERROR, errmsg);
104
106
errmsg_printf(ERRMSG_LVL_ERROR, ER(ER_CANT_FIND_DL_ENTRY),
105
plugin_declarations_sym, dlpath.c_str());
107
plugin_decl_sym.c_str(), dlpath.c_str());
111
const Manifest *manifest= reinterpret_cast<plugin::Manifest *>(sym);
113
const Manifest *manifest= static_cast<plugin::Manifest *>(sym);
114
if (manifest->drizzle_version != DRIZZLE_VERSION_ID)
116
errmsg_printf(ERRMSG_LVL_ERROR,
117
_("Plugin module %s was compiled for version %" PRIu64 ", "
118
"which does not match the current running version of "
119
"Drizzle: %" PRIu64"."),
120
dlpath.c_str(), manifest->drizzle_version,
112
125
return new (nothrow) plugin::Library(plugin_name, handle, manifest);