192
192
static void *operator new(size_t size, MEM_ROOT *mem_root)
193
193
{ return (void*) alloc_root(mem_root, (uint) size); }
194
static void operator delete(void *ptr_arg __attribute__((unused)),
195
size_t size __attribute__((unused)))
194
static void operator delete(void *, size_t)
196
195
{ TRASH(ptr_arg, size); }
198
197
sys_var_pluginvar(const char *name_arg,
208
207
TYPELIB* plugin_var_typelib(void);
209
208
unsigned char* value_ptr(Session *session, enum_var_type type, LEX_STRING *base);
210
209
bool check(Session *session, set_var *var);
211
bool check_default(enum_var_type type __attribute__((unused)))
210
bool check_default(enum_var_type)
212
211
{ return is_readonly(); }
213
void set_default(Session *session,
214
enum_var_type type __attribute__((unused)));
212
void set_default(Session *session, enum_var_type);
215
213
bool update(Session *session, set_var *var);
881
879
extern "C" unsigned char *get_bookmark_hash_key(const unsigned char *, size_t *, bool);
884
unsigned char *get_plugin_hash_key(const unsigned char *buff, size_t *length,
885
bool not_used __attribute__((unused)))
882
unsigned char *get_plugin_hash_key(const unsigned char *buff, size_t *length, bool)
887
884
struct st_plugin_int *plugin= (st_plugin_int *)buff;
888
885
*length= (uint)plugin->name.length;
893
unsigned char *get_bookmark_hash_key(const unsigned char *buff, size_t *length,
894
bool not_used __attribute__((unused)))
890
unsigned char *get_bookmark_hash_key(const unsigned char *buff, size_t *length, bool)
896
892
struct st_bookmark *var= (st_bookmark *)buff;
897
893
*length= var->name_len + 1;
1361
1357
default variable data check and update functions
1362
1358
****************************************************************************/
1364
static int check_func_bool(Session *session __attribute__((unused)),
1365
struct st_mysql_sys_var *var,
1360
static int check_func_bool(Session *, struct st_mysql_sys_var *var,
1366
1361
void *save, st_mysql_value *value)
1368
1363
char buff[STRING_BUFFER_USUAL_SIZE];
1460
1455
var->name, (int64_t) tmp);
1463
static int check_func_str(Session *session,
1464
struct st_mysql_sys_var *var __attribute__((unused)),
1458
static int check_func_str(Session *session, struct st_mysql_sys_var *,
1465
1459
void *save, st_mysql_value *value)
1467
1461
char buff[STRING_BUFFER_USUAL_SIZE];
1479
static int check_func_enum(Session *session __attribute__((unused)),
1480
struct st_mysql_sys_var *var,
1473
static int check_func_enum(Session *, struct st_mysql_sys_var *var,
1481
1474
void *save, st_mysql_value *value)
1483
1476
char buff[STRING_BUFFER_USUAL_SIZE];
1526
static int check_func_set(Session *session __attribute__((unused)),
1527
struct st_mysql_sys_var *var,
1519
static int check_func_set(Session *, struct st_mysql_sys_var *var,
1528
1520
void *save, st_mysql_value *value)
1530
1522
char buff[STRING_BUFFER_USUAL_SIZE], *error= 0;
1579
static void update_func_bool(Session *session __attribute__((unused)),
1580
struct st_mysql_sys_var *var __attribute__((unused)),
1571
static void update_func_bool(Session *, struct st_mysql_sys_var *,
1581
1572
void *tgt, const void *save)
1583
1574
*(bool *) tgt= *(int *) save ? 1 : 0;
1587
static void update_func_int(Session *session __attribute__((unused)),
1588
struct st_mysql_sys_var *var __attribute__((unused)),
1578
static void update_func_int(Session *, struct st_mysql_sys_var *,
1589
1579
void *tgt, const void *save)
1591
1581
*(int *)tgt= *(int *) save;
1595
static void update_func_long(Session *session __attribute__((unused)),
1596
struct st_mysql_sys_var *var __attribute__((unused)),
1585
static void update_func_long(Session *, struct st_mysql_sys_var *,
1597
1586
void *tgt, const void *save)
1599
1588
*(long *)tgt= *(long *) save;
1603
static void update_func_int64_t(Session *session __attribute__((unused)),
1604
struct st_mysql_sys_var *var __attribute__((unused)),
1592
static void update_func_int64_t(Session *, struct st_mysql_sys_var *,
1605
1593
void *tgt, const void *save)
1607
1595
*(int64_t *)tgt= *(uint64_t *) save;
1611
static void update_func_str(Session *session __attribute__((unused)), struct st_mysql_sys_var *var,
1599
static void update_func_str(Session *, struct st_mysql_sys_var *var,
1612
1600
void *tgt, const void *save)
1614
1602
char *old= *(char **) tgt;
1952
1940
Unlocks all system variables which hold a reference
1954
static void unlock_variables(Session *session __attribute__((unused)),
1955
struct system_variables *vars)
1942
static void unlock_variables(Session *, struct system_variables *vars)
1957
1944
intern_plugin_unlock(NULL, vars->table_plugin);
1958
1945
vars->table_plugin= NULL;
2131
unsigned char* sys_var_pluginvar::value_ptr(Session *session, enum_var_type type,
2132
LEX_STRING *base __attribute__((unused)))
2118
unsigned char* sys_var_pluginvar::value_ptr(Session *session, enum_var_type type, LEX_STRING *)
2134
2120
unsigned char* result;
2384
2370
extern "C" bool get_one_plugin_option(int optid, const struct my_option *,
2387
bool get_one_plugin_option(int optid __attribute__((unused)),
2388
const struct my_option *opt __attribute__((unused)),
2389
char *argument __attribute__((unused)))
2373
bool get_one_plugin_option(int, const struct my_option *, char *)