cleanup: remove convert_dash_to_underscore
it was a no-op, plugin variables don't have dashes
This commit is contained in:
parent
df10a945fc
commit
53582238a3
@ -134,15 +134,6 @@ double getopt_double_limit_value(double num, const struct my_option *optp,
|
|||||||
ulonglong getopt_double2ulonglong(double);
|
ulonglong getopt_double2ulonglong(double);
|
||||||
double getopt_ulonglong2double(ulonglong);
|
double getopt_ulonglong2double(ulonglong);
|
||||||
|
|
||||||
static inline void convert_dash_to_underscore(char *str, size_t len)
|
|
||||||
{
|
|
||||||
for (char *p= str; p <= str+len; p++)
|
|
||||||
if (*p == '-')
|
|
||||||
*p= '_';
|
|
||||||
else if (*p != '_' && isalnum(*p) == 0)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void convert_underscore_to_dash(char *str, size_t len)
|
static inline void convert_underscore_to_dash(char *str, size_t len)
|
||||||
{
|
{
|
||||||
for (char *p= str; p <= str+len; p++)
|
for (char *p= str; p <= str+len; p++)
|
||||||
|
@ -4220,10 +4220,9 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
|
|||||||
var= NULL;
|
var= NULL;
|
||||||
len= tmp->name.length + strlen(o->name) + 2;
|
len= tmp->name.length + strlen(o->name) + 2;
|
||||||
varname= (char*) alloc_root(mem_root, len);
|
varname= (char*) alloc_root(mem_root, len);
|
||||||
strxmov(varname, tmp->name.str, "-", o->name, NullS);
|
strxmov(varname, tmp->name.str, "_", o->name, NullS);
|
||||||
// Ok to use latin1, as the variable name is pure ASCII
|
// Ok to use latin1, as the variable name is pure ASCII
|
||||||
my_casedn_str_latin1(varname);
|
my_casedn_str_latin1(varname);
|
||||||
convert_dash_to_underscore(varname, len-1);
|
|
||||||
}
|
}
|
||||||
if (o->flags & PLUGIN_VAR_NOSYSVAR)
|
if (o->flags & PLUGIN_VAR_NOSYSVAR)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user