@@ -473,7 +473,7 @@ static SHOW_TYPE pluginvar_show_type(st_mysql_sys_var *plugin_var);
473
473
*/
474
474
class sys_var_pluginvar : public sys_var
475
475
{
476
- static bool on_check_pluginvar (sys_var *self, THD *thd , set_var *var);
476
+ static bool on_check_pluginvar (sys_var *self, THD* , set_var *var);
477
477
public:
478
478
st_plugin_int *plugin;
479
479
st_mysql_sys_var *plugin_var;
@@ -487,14 +487,15 @@ class sys_var_pluginvar: public sys_var
487
487
const char *orig_pluginvar_name;
488
488
489
489
static void *operator new (size_t size, MEM_ROOT *mem_root,
490
- const std::nothrow_t &arg= std::nothrow) throw ()
490
+ const std::nothrow_t &arg MY_ATTRIBUTE ((unused))=
491
+ std::nothrow) throw ()
491
492
{ return alloc_root (mem_root, size); }
492
493
493
494
static void operator delete (void *ptr_arg,size_t size)
494
495
{ TRASH (ptr_arg, size); }
495
496
496
- static void operator delete (void *ptr , MEM_ROOT *mem_root ,
497
- const std::nothrow_t &arg ) throw ()
497
+ static void operator delete (void * , MEM_ROOT* ,
498
+ const std::nothrow_t & ) throw ()
498
499
{ /* never called */ }
499
500
500
501
sys_var_pluginvar (sys_var_chain *chain, const char *name_arg,
@@ -522,8 +523,8 @@ class sys_var_pluginvar: public sys_var
522
523
uchar* global_value_ptr (THD *thd, LEX_STRING *base)
523
524
{ return do_value_ptr (thd, OPT_GLOBAL, base); }
524
525
bool do_check (THD *thd, set_var *var);
525
- virtual void session_save_default (THD *thd , set_var *var ) {}
526
- virtual void global_save_default (THD *thd , set_var *var ) {}
526
+ virtual void session_save_default (THD* , set_var* ) {}
527
+ virtual void global_save_default (THD* , set_var* ) {}
527
528
bool session_update (THD *thd, set_var *var);
528
529
bool global_update (THD *thd, set_var *var);
529
530
bool is_default (THD *thd, set_var *var);
@@ -545,7 +546,7 @@ static int test_plugin_options(MEM_ROOT *, st_plugin_int *,
545
546
int *, char **);
546
547
static bool register_builtin (st_mysql_plugin *, st_plugin_int *,
547
548
st_plugin_int **);
548
- static void unlock_variables (THD *thd, struct System_variables *vars);
549
+ static void unlock_variables (struct System_variables *vars);
549
550
static void cleanup_variables (THD *thd, struct System_variables *vars);
550
551
static void plugin_vars_free_values (sys_var *vars);
551
552
static bool plugin_var_memalloc_session_update (THD *thd,
@@ -2117,8 +2118,8 @@ void plugin_shutdown(void)
2117
2118
/*
2118
2119
release any plugin references held.
2119
2120
*/
2120
- unlock_variables (NULL , &global_system_variables);
2121
- unlock_variables (NULL , &max_system_variables);
2121
+ unlock_variables (&global_system_variables);
2122
+ unlock_variables (&max_system_variables);
2122
2123
}
2123
2124
}
2124
2125
@@ -2624,7 +2625,7 @@ typedef DECLARE_MYSQL_THDVAR_SIMPLE(thdvar_double_t, double);
2624
2625
default variable data check and update functions
2625
2626
****************************************************************************/
2626
2627
2627
- static int check_func_bool (THD *thd , st_mysql_sys_var *var ,
2628
+ static int check_func_bool (THD* , st_mysql_sys_var* ,
2628
2629
void *save, st_mysql_value *value)
2629
2630
{
2630
2631
char buff[STRING_BUFFER_USUAL_SIZE];
@@ -2740,7 +2741,7 @@ static int check_func_longlong(THD *thd, st_mysql_sys_var *var,
2740
2741
value->is_unsigned (value), orig);
2741
2742
}
2742
2743
2743
- static int check_func_str (THD *thd, st_mysql_sys_var *var ,
2744
+ static int check_func_str (THD *thd, st_mysql_sys_var* ,
2744
2745
void *save, st_mysql_value *value)
2745
2746
{
2746
2747
char buff[STRING_BUFFER_USUAL_SIZE];
@@ -2755,7 +2756,7 @@ static int check_func_str(THD *thd, st_mysql_sys_var *var,
2755
2756
}
2756
2757
2757
2758
2758
- static int check_func_enum (THD *thd , st_mysql_sys_var *var,
2759
+ static int check_func_enum (THD* , st_mysql_sys_var *var,
2759
2760
void *save, st_mysql_value *value)
2760
2761
{
2761
2762
char buff[STRING_BUFFER_USUAL_SIZE];
@@ -2793,7 +2794,7 @@ static int check_func_enum(THD *thd, st_mysql_sys_var *var,
2793
2794
}
2794
2795
2795
2796
2796
- static int check_func_set (THD *thd , st_mysql_sys_var *var,
2797
+ static int check_func_set (THD* , st_mysql_sys_var *var,
2797
2798
void *save, st_mysql_value *value)
2798
2799
{
2799
2800
char buff[STRING_BUFFER_USUAL_SIZE], *error= 0 ;
@@ -2848,41 +2849,41 @@ static int check_func_double(THD *thd, st_mysql_sys_var *var,
2848
2849
}
2849
2850
2850
2851
2851
- static void update_func_bool (THD *thd , st_mysql_sys_var *var ,
2852
+ static void update_func_bool (THD* , st_mysql_sys_var* ,
2852
2853
void *tgt, const void *save)
2853
2854
{
2854
2855
*(my_bool *) tgt= *(my_bool *) save ? TRUE : FALSE ;
2855
2856
}
2856
2857
2857
2858
2858
- static void update_func_int (THD *thd , st_mysql_sys_var *var ,
2859
- void *tgt, const void *save)
2859
+ static void update_func_int (THD* , st_mysql_sys_var* ,
2860
+ void *tgt, const void *save)
2860
2861
{
2861
2862
*(int *)tgt= *(int *) save;
2862
2863
}
2863
2864
2864
2865
2865
- static void update_func_long (THD *thd , st_mysql_sys_var *var ,
2866
+ static void update_func_long (THD* , st_mysql_sys_var* ,
2866
2867
void *tgt, const void *save)
2867
2868
{
2868
2869
*(long *)tgt= *(long *) save;
2869
2870
}
2870
2871
2871
2872
2872
- static void update_func_longlong (THD *thd , st_mysql_sys_var *var ,
2873
- void *tgt, const void *save)
2873
+ static void update_func_longlong (THD* , st_mysql_sys_var* ,
2874
+ void *tgt, const void *save)
2874
2875
{
2875
2876
*(longlong *)tgt= *(ulonglong *) save;
2876
2877
}
2877
2878
2878
2879
2879
- static void update_func_str (THD *thd , st_mysql_sys_var *var ,
2880
+ static void update_func_str (THD* , st_mysql_sys_var* ,
2880
2881
void *tgt, const void *save)
2881
2882
{
2882
2883
*(char **) tgt= *(char **) save;
2883
2884
}
2884
2885
2885
- static void update_func_double (THD *thd , st_mysql_sys_var *var ,
2886
+ static void update_func_double (THD* , st_mysql_sys_var* ,
2886
2887
void *tgt, const void *save)
2887
2888
{
2888
2889
*(double *) tgt= *(double *) save;
@@ -3331,7 +3332,7 @@ void plugin_thdvar_init(THD *thd, bool enable_plugins)
3331
3332
/*
3332
3333
Unlocks all system variables which hold a reference
3333
3334
*/
3334
- static void unlock_variables (THD *thd, struct System_variables *vars)
3335
+ static void unlock_variables (struct System_variables *vars)
3335
3336
{
3336
3337
intern_plugin_unlock (NULL , vars->table_plugin );
3337
3338
intern_plugin_unlock (NULL , vars->temp_table_plugin );
@@ -3376,7 +3377,7 @@ void plugin_thdvar_cleanup(THD *thd, bool enable_plugins)
3376
3377
if (enable_plugins)
3377
3378
{
3378
3379
Mutex_lock plugin_lock (&LOCK_plugin);
3379
- unlock_variables (thd, &thd->variables );
3380
+ unlock_variables (&thd->variables );
3380
3381
size_t idx;
3381
3382
if ((idx= thd->lex ->plugins .size ()))
3382
3383
{
@@ -3668,7 +3669,7 @@ TYPELIB* sys_var_pluginvar::plugin_var_typelib(void)
3668
3669
3669
3670
3670
3671
uchar* sys_var_pluginvar::do_value_ptr (THD *running_thd, THD *target_thd, enum_var_type type,
3671
- LEX_STRING *base )
3672
+ LEX_STRING* )
3672
3673
{
3673
3674
uchar* result;
3674
3675
@@ -3909,13 +3910,12 @@ ulonglong sys_var_pluginvar::get_max_value()
3909
3910
sys_var_pluginvar::do_check(), PLUGIN_VAR_NODEFAULT
3910
3911
3911
3912
@param self the sys_var structure for the variable being set
3912
- @param thd the current thread
3913
3913
@param var the data about the value being set
3914
3914
@return is the setting valid
3915
3915
@retval true not valid
3916
3916
@retval false valid
3917
3917
*/
3918
- bool sys_var_pluginvar::on_check_pluginvar (sys_var *self, THD *thd , set_var *var)
3918
+ bool sys_var_pluginvar::on_check_pluginvar (sys_var *self, THD* , set_var *var)
3919
3919
{
3920
3920
/* This handler is installed only if NO_DEFAULT is specified */
3921
3921
DBUG_ASSERT (((sys_var_pluginvar *) self)->plugin_var ->flags &
@@ -4046,12 +4046,10 @@ static void plugin_opt_set_limits(struct my_option *options,
4046
4046
options->arg_type = OPT_ARG;
4047
4047
}
4048
4048
4049
- extern " C" my_bool get_one_plugin_option (int optid , const struct my_option *,
4049
+ extern " C" my_bool get_one_plugin_option (int , const struct my_option *,
4050
4050
char *);
4051
4051
4052
- my_bool get_one_plugin_option (int optid MY_ATTRIBUTE ((unused)),
4053
- const struct my_option *opt,
4054
- char *argument)
4052
+ my_bool get_one_plugin_option (int , const struct my_option *, char *)
4055
4053
{
4056
4054
return 0 ;
4057
4055
}
0 commit comments