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

Function construct_help_options

sql/sql_plugin.cc:4125–4153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4123
4124
4125static my_option *construct_help_options(MEM_ROOT *mem_root,
4126 struct st_plugin_int *p)
4127{
4128 st_mysql_sys_var **opt;
4129 my_option *opts;
4130 uint count= EXTRA_OPTIONS;
4131 DBUG_ENTER("construct_help_options");
4132
4133 for (opt= p->plugin->system_vars; opt && *opt; opt++, count+= 2)
4134 ;
4135
4136 if (!(opts= (my_option*) alloc_root(mem_root, sizeof(my_option) * count)))
4137 DBUG_RETURN(NULL);
4138
4139 bzero(opts, sizeof(my_option) * count);
4140
4141 /**
4142 some plugin variables
4143 have their names prefixed with the plugin name. Restore the names here
4144 to get the correct (not double-prefixed) help text.
4145 We won't need @@sysvars anymore and don't care about their proper names.
4146 */
4147 restore_ptr_backup(p->nbackups, p->ptr_backup);
4148
4149 if (construct_options(mem_root, p, opts))
4150 DBUG_RETURN(NULL);
4151
4152 DBUG_RETURN(opts);
4153}
4154
4155extern "C" my_bool mark_changed(const struct my_option *, const char *,
4156 const char *);

Callers 1

add_plugin_optionsFunction · 0.85

Calls 3

alloc_rootFunction · 0.85
restore_ptr_backupFunction · 0.85
construct_optionsFunction · 0.85

Tested by

no test coverage detected