Sys_var_plugin: use const for default plugin name

This commit is contained in:
Nikita Malyavin 2024-05-24 21:44:52 +02:00 committed by Oleksandr Byelkin
parent 4a819f52e3
commit 68e369e3a9
3 changed files with 7 additions and 6 deletions

View file

@ -348,8 +348,8 @@ static char *lc_messages;
static char *lc_time_names_name;
char *my_bind_addr_str;
static char *default_collation_name;
char *default_storage_engine, *default_tmp_storage_engine;
char *enforced_storage_engine=NULL;
const char *default_storage_engine, *default_tmp_storage_engine;
const char *enforced_storage_engine=NULL;
char *gtid_pos_auto_engines;
plugin_ref *opt_gtid_pos_auto_plugins;
static char compiled_default_collation_name[]= MYSQL_DEFAULT_COLLATION_NAME;
@ -4854,7 +4854,8 @@ static void add_file_to_crash_report(char *file)
init_default_storage_engine_impl(#X, X, &global_system_variables.Y)
static int init_default_storage_engine_impl(const char *opt_name,
char *engine_name, plugin_ref *res)
const char *engine_name,
plugin_ref *res)
{
if (!engine_name)
{

View file

@ -146,8 +146,8 @@ extern ulong opt_replicate_events_marked_for_skip;
extern char *default_tz_name;
extern Time_zone *default_tz;
extern char *my_bind_addr_str;
extern char *default_storage_engine, *default_tmp_storage_engine;
extern char *enforced_storage_engine;
extern const char *default_storage_engine, *default_tmp_storage_engine;
extern const char *enforced_storage_engine;
extern char *gtid_pos_auto_engines;
extern plugin_ref *opt_gtid_pos_auto_plugins;
extern bool opt_endinfo, using_udf_functions;

View file

@ -1640,7 +1640,7 @@ public:
Sys_var_plugin(const char *name_arg,
const char *comment, int flag_args, ptrdiff_t off, size_t size,
CMD_LINE getopt,
int plugin_type_arg, char **def_val, PolyLock *lock=0,
int plugin_type_arg, const char **def_val, PolyLock *lock=0,
enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
on_check_function on_check_func=0,
on_update_function on_update_func=0,