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

Function plugin_dl_foreach

sql/sql_plugin.cc:2615–2645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2613}
2614
2615bool plugin_dl_foreach(THD *thd, const LEX_CSTRING *dl,
2616 plugin_foreach_func *func, void *arg)
2617{
2618 bool err= 0;
2619
2620 if (dl)
2621 {
2622 mysql_mutex_lock(&LOCK_plugin);
2623 st_plugin_dl *plugin_dl= plugin_dl_add(dl, MYF(0));
2624 mysql_mutex_unlock(&LOCK_plugin);
2625
2626 if (!plugin_dl)
2627 return 1;
2628
2629 err= plugin_dl_foreach_internal(thd, plugin_dl, plugin_dl->plugins,
2630 func, arg);
2631
2632 mysql_mutex_lock(&LOCK_plugin);
2633 plugin_dl_del(plugin_dl);
2634 mysql_mutex_unlock(&LOCK_plugin);
2635 }
2636 else
2637 {
2638 struct st_maria_plugin **builtins;
2639 for (builtins= mysql_mandatory_plugins; !err && *builtins; builtins++)
2640 err= plugin_dl_foreach_internal(thd, 0, *builtins, func, arg);
2641 for (builtins= mysql_optional_plugins; !err && *builtins; builtins++)
2642 err= plugin_dl_foreach_internal(thd, 0, *builtins, func, arg);
2643 }
2644 return err;
2645}
2646
2647
2648/****************************************************************************

Callers 1

fill_all_pluginsFunction · 0.85

Calls 3

plugin_dl_addFunction · 0.85
plugin_dl_delFunction · 0.85

Tested by

no test coverage detected