Commit 18feb62f authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-6819 st_mysql_show_var::value should be void* not char*

parent 20cacb00
......@@ -190,12 +190,12 @@ enum enum_var_type
struct st_mysql_show_var {
const char *name;
char *value;
void *value;
enum enum_mysql_show_type type;
};
#define SHOW_VAR_FUNC_BUFF_SIZE (256 * sizeof(void*))
typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, char *, enum enum_var_type);
typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, void *, enum enum_var_type);
/*
......
......@@ -231,10 +231,10 @@ enum enum_var_type
};
struct st_mysql_show_var {
const char *name;
char *value;
void *value;
enum enum_mysql_show_type type;
};
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *, enum enum_var_type);
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, void *, enum enum_var_type);
struct st_mysql_sys_var;
struct st_mysql_value;
typedef int (*mysql_var_check_func)(void* thd,
......
......@@ -231,10 +231,10 @@ enum enum_var_type
};
struct st_mysql_show_var {
const char *name;
char *value;
void *value;
enum enum_mysql_show_type type;
};
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *, enum enum_var_type);
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, void *, enum enum_var_type);
struct st_mysql_sys_var;
struct st_mysql_value;
typedef int (*mysql_var_check_func)(void* thd,
......
......@@ -231,10 +231,10 @@ enum enum_var_type
};
struct st_mysql_show_var {
const char *name;
char *value;
void *value;
enum enum_mysql_show_type type;
};
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *, enum enum_var_type);
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, void *, enum enum_var_type);
struct st_mysql_sys_var;
struct st_mysql_value;
typedef int (*mysql_var_check_func)(void* thd,
......
......@@ -231,10 +231,10 @@ enum enum_var_type
};
struct st_mysql_show_var {
const char *name;
char *value;
void *value;
enum enum_mysql_show_type type;
};
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *, enum enum_var_type);
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, void *, enum enum_var_type);
struct st_mysql_sys_var;
struct st_mysql_value;
typedef int (*mysql_var_check_func)(void* thd,
......
......@@ -231,10 +231,10 @@ enum enum_var_type
};
struct st_mysql_show_var {
const char *name;
char *value;
void *value;
enum enum_mysql_show_type type;
};
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *, enum enum_var_type);
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, void *, enum enum_var_type);
struct st_mysql_sys_var;
struct st_mysql_value;
typedef int (*mysql_var_check_func)(void* thd,
......
This diff is collapsed.
......@@ -3132,15 +3132,15 @@ static bool show_status_array(THD *thd, const char *wild,
name_buffer, wild))) &&
(!cond || cond->val_int()))
{
char *value=var->value;
void *value=var->value;
const char *pos, *end; // We assign a lot of const's
if (show_type == SHOW_SYS)
{
sys_var *var= ((sys_var *) value);
sys_var *var= (sys_var *) value;
show_type= var->show_type();
mysql_mutex_lock(&LOCK_global_system_variables);
value= (char*) var->value_ptr(thd, scope, &null_lex_str);
value= var->value_ptr(thd, scope, &null_lex_str);
charset= var->charset(thd);
}
......@@ -3200,7 +3200,7 @@ static bool show_status_array(THD *thd, const char *wild,
}
case SHOW_CHAR:
{
if (!(pos= value))
if (!(pos= (char*)value))
pos= "";
end= strend(pos);
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment