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

Function plugin_vars_free_values

sql/sql_plugin.cc:3445–3475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3443*/
3444
3445static void plugin_vars_free_values(st_mysql_sys_var **vars)
3446{
3447 DBUG_ENTER("plugin_vars_free_values");
3448
3449 if (!vars)
3450 DBUG_VOID_RETURN;
3451
3452 while(st_mysql_sys_var *var= *vars++)
3453 {
3454 if ((var->flags & PLUGIN_VAR_TYPEMASK) == PLUGIN_VAR_STR &&
3455 var->flags & PLUGIN_VAR_MEMALLOC)
3456 {
3457 char **val;
3458 if (var->flags & PLUGIN_VAR_THDLOCAL)
3459 {
3460 st_bookmark *v= find_bookmark(0, var->name, var->flags);
3461 if (!v)
3462 continue;
3463 val= (char**)(global_system_variables.dynamic_variables_ptr + v->offset);
3464 }
3465 else
3466 val= *(char***) (var + 1);
3467
3468 DBUG_PRINT("plugin", ("freeing value for: '%s' addr: %p",
3469 var->name, val));
3470 my_free(*val);
3471 *val= NULL;
3472 }
3473 }
3474 DBUG_VOID_RETURN;
3475}
3476
3477static SHOW_TYPE pluginvar_show_type(const st_mysql_sys_var *plugin_var)
3478{

Callers 1

plugin_delFunction · 0.85

Calls 2

find_bookmarkFunction · 0.85
my_freeFunction · 0.85

Tested by

no test coverage detected