mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Merge of mysql-5.1-bugteam into mysql-trunk-merge.
This commit is contained in:
commit
db2fe44c84
61 changed files with 1018 additions and 913 deletions
|
|
@ -119,6 +119,6 @@ void wf_end(WF_PACK *buffer)
|
|||
{
|
||||
DBUG_ENTER("wf_end");
|
||||
if (buffer)
|
||||
my_free((uchar*) buffer,MYF(0));
|
||||
my_free(buffer, MYF(0));
|
||||
DBUG_VOID_RETURN;
|
||||
} /* wf_end */
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#include <errno.h>
|
||||
#include <m_string.h>
|
||||
|
||||
typedef void (*init_func_p)(const struct my_option *option, uchar **variable,
|
||||
typedef void (*init_func_p)(const struct my_option *option, void *variable,
|
||||
longlong value);
|
||||
|
||||
static void default_reporter(enum loglevel level, const char *format, ...);
|
||||
|
|
@ -34,9 +34,9 @@ static longlong getopt_ll(char *arg, const struct my_option *optp, int *err);
|
|||
static ulonglong getopt_ull(char *, const struct my_option *, int *);
|
||||
static double getopt_double(char *arg, const struct my_option *optp, int *err);
|
||||
static void init_variables(const struct my_option *, init_func_p);
|
||||
static void init_one_value(const struct my_option *, uchar **, longlong);
|
||||
static void fini_one_value(const struct my_option *, uchar **, longlong);
|
||||
static int setval(const struct my_option *, uchar **, char *, my_bool);
|
||||
static void init_one_value(const struct my_option *, void *, longlong);
|
||||
static void fini_one_value(const struct my_option *, void *, longlong);
|
||||
static int setval(const struct my_option *, void *, char *, my_bool);
|
||||
static char *check_struct_option(char *cur_arg, char *key_name);
|
||||
|
||||
/*
|
||||
|
|
@ -83,10 +83,9 @@ static void default_reporter(enum loglevel level,
|
|||
fflush(stderr);
|
||||
}
|
||||
|
||||
static uchar** (*getopt_get_addr)(const char *, uint, const struct my_option *, int *);
|
||||
static my_getopt_value getopt_get_addr;
|
||||
|
||||
void my_getopt_register_get_addr(uchar** (*func_addr)(const char *, uint,
|
||||
const struct my_option *, int *))
|
||||
void my_getopt_register_get_addr(my_getopt_value func_addr)
|
||||
{
|
||||
getopt_get_addr= func_addr;
|
||||
}
|
||||
|
|
@ -117,7 +116,7 @@ int handle_options(int *argc, char ***argv,
|
|||
char **pos, **pos_end, *optend, *UNINIT_VAR(prev_found),
|
||||
*opt_str, key_name[FN_REFLEN];
|
||||
const struct my_option *optp;
|
||||
uchar* *value;
|
||||
void *value;
|
||||
int error, i;
|
||||
my_bool is_cmdline_arg= 1;
|
||||
|
||||
|
|
@ -333,7 +332,7 @@ int handle_options(int *argc, char ***argv,
|
|||
optp->value;
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
|
||||
if (optp->arg_type == NO_ARG)
|
||||
{
|
||||
if (optend && (optp->var_type & GET_TYPE_MASK) != GET_BOOL)
|
||||
|
|
@ -546,7 +545,7 @@ static char *check_struct_option(char *cur_arg, char *key_name)
|
|||
Will set the option value to given value
|
||||
*/
|
||||
|
||||
static int setval(const struct my_option *opts, uchar **value, char *argument,
|
||||
static int setval(const struct my_option *opts, void *value, char *argument,
|
||||
my_bool set_maximum_value)
|
||||
{
|
||||
int err= 0, res= 0;
|
||||
|
|
@ -1000,7 +999,7 @@ static double getopt_double(char *arg, const struct my_option *optp, int *err)
|
|||
value Pointer to variable
|
||||
*/
|
||||
|
||||
static void init_one_value(const struct my_option *option, uchar* *variable,
|
||||
static void init_one_value(const struct my_option *option, void *variable,
|
||||
longlong value)
|
||||
{
|
||||
DBUG_ENTER("init_one_value");
|
||||
|
|
@ -1075,7 +1074,7 @@ static void init_one_value(const struct my_option *option, uchar* *variable,
|
|||
value Pointer to variable
|
||||
*/
|
||||
|
||||
static void fini_one_value(const struct my_option *option, uchar* *variable,
|
||||
static void fini_one_value(const struct my_option *option, void *variable,
|
||||
longlong value __attribute__ ((unused)))
|
||||
{
|
||||
DBUG_ENTER("fini_one_value");
|
||||
|
|
@ -1116,7 +1115,7 @@ static void init_variables(const struct my_option *options,
|
|||
DBUG_ENTER("init_variables");
|
||||
for (; options->name; options++)
|
||||
{
|
||||
uchar **value;
|
||||
void *value;
|
||||
DBUG_PRINT("options", ("name: '%s'", options->name));
|
||||
/*
|
||||
We must set u_max_value first as for some variables
|
||||
|
|
@ -1261,7 +1260,7 @@ void my_print_variables(const struct my_option *options)
|
|||
|
||||
for (optp= options; optp->name; optp++)
|
||||
{
|
||||
uchar **value= (optp->var_type & GET_ASK_ADDR ?
|
||||
void *value= (optp->var_type & GET_ASK_ADDR ?
|
||||
(*getopt_get_addr)("", 0, optp, 0) : optp->value);
|
||||
if (value)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue