MCPcopy Create free account
hub / github.com/MariaDB/server / plugin_del

Function plugin_del

sql/sql_plugin.cc:1298–1318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1296}
1297
1298static 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
1320static void reap_plugins(void)
1321{

Callers 3

reap_pluginsFunction · 0.85
plugin_initFunction · 0.85
plugin_shutdownFunction · 0.85

Calls 5

plugin_vars_free_valuesFunction · 0.85
restore_ptr_backupFunction · 0.85
my_hash_deleteFunction · 0.85
plugin_dl_delFunction · 0.85
free_rootFunction · 0.85

Tested by

no test coverage detected