1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

MDEV-4403 Attempting to use cassandra storage engine causes "service 'my_snprintf_service' interface version mismatch"

When a DSO is loaded we rewrite service pointers to point to the actual service structures.
But when a DSO is unloaded, we have to restore their original values, in case this DSO
wasn't removed from memory on dlclose() and is later loaded again.
This commit is contained in:
Sergei Golubchik
2013-12-09 12:39:13 +01:00
parent 182ffc0cc8
commit 47ee721923
4 changed files with 102 additions and 4 deletions

View File

@@ -81,15 +81,24 @@ typedef struct st_mysql_show_var SHOW_VAR;
/* A handle for the dynamic library containing a plugin or plugins. */
struct st_ptr_backup {
void **ptr;
void *value;
void save(void **p) { ptr= p; value= *p; }
void restore() { *ptr= value; }
};
struct st_plugin_dl
{
LEX_STRING dl;
void *handle;
struct st_maria_plugin *plugins;
st_ptr_backup *ptr_backup;
uint nbackups;
uint ref_count; /* number of plugins loaded from the library */
int mysqlversion;
int mariaversion;
bool allocated;
uint ref_count; /* number of plugins loaded from the library */
};
/* A handle of a plugin */