| 1296 | } |
| 1297 | |
| 1298 | static void plugin_del(struct st_plugin_int *plugin, uint del_mask) |
| 1299 | { |
| 1300 | DBUG_ENTER("plugin_del"); |
| 1301 | mysql_mutex_assert_owner(&LOCK_plugin); |
| 1302 | del_mask|= PLUGIN_IS_UNINITIALIZED | PLUGIN_IS_DISABLED; // always use these |
| 1303 | if (!(plugin->state & del_mask)) |
| 1304 | DBUG_VOID_RETURN; |
| 1305 | /* Free allocated strings before deleting the plugin. */ |
| 1306 | plugin_vars_free_values(plugin->plugin->system_vars); |
| 1307 | restore_ptr_backup(plugin->nbackups, plugin->ptr_backup); |
| 1308 | if (plugin->plugin_dl) |
| 1309 | { |
| 1310 | my_hash_delete(&plugin_hash[plugin->plugin->type], (uchar*)plugin); |
| 1311 | plugin_dl_del(plugin->plugin_dl); |
| 1312 | plugin->state= PLUGIN_IS_FREED; |
| 1313 | free_root(&plugin->mem_root, MYF(0)); |
| 1314 | } |
| 1315 | else |
| 1316 | plugin->state= PLUGIN_IS_UNINITIALIZED; |
| 1317 | DBUG_VOID_RETURN; |
| 1318 | } |
| 1319 | |
| 1320 | static void reap_plugins(void) |
| 1321 | { |
no test coverage detected