diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-12-09 12:39:13 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-12-09 12:39:13 +0100 |
commit | 47ee721923053a122576b44b5954534edb259355 (patch) | |
tree | 8737085ed83bc2642eb94e8d38b1a3103ea563a9 /sql/sql_plugin.h | |
parent | 182ffc0cc8a0b389e5a31ae0e2c03c7a629f43de (diff) | |
download | mariadb-git-47ee721923053a122576b44b5954534edb259355.tar.gz |
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.
Diffstat (limited to 'sql/sql_plugin.h')
-rw-r--r-- | sql/sql_plugin.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h index 5327b27e97c..5aa336a1309 100644 --- a/sql/sql_plugin.h +++ b/sql/sql_plugin.h @@ -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 */ |